* move "dhcpServer" to "config"

This commit is contained in:
Simon Zolin
2019-07-09 18:57:41 +03:00
parent 5e309a7b3a
commit 001b4b981f
3 changed files with 14 additions and 15 deletions

View File

@@ -122,7 +122,7 @@ func (clients *clientsContainer) Find(ip string) (Client, bool) {
if err != nil {
continue
}
ipAddr := dhcpServer.FindIPbyMAC(mac)
ipAddr := config.dhcpServer.FindIPbyMAC(mac)
if ipAddr == nil {
continue
}
@@ -395,7 +395,7 @@ func handleGetClients(w http.ResponseWriter, r *http.Request) {
if len(c.MAC) != 0 {
hwAddr, _ := net.ParseMAC(c.MAC)
ipAddr := dhcpServer.FindIPbyMAC(hwAddr)
ipAddr := config.dhcpServer.FindIPbyMAC(hwAddr)
if ipAddr != nil {
cj.IP = ipAddr.String()
}