learn all values

This commit is contained in:
Martin/Geno 2018-07-25 14:50:47 +02:00
parent 17ac739753
commit 4643af5259
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
1 changed files with 13 additions and 0 deletions

View File

@ -49,11 +49,24 @@ func (db *DB) LearnClient(apIP net.IP, clientWifictl *data.WifiClient) bool {
client.Lastseen = jsontime.Now()
client.AP = ap
client.APAddr = apAddr
client.Connected = clientWifictl.Connected
client.SignalLowFreq = clientWifictl.SignalLowFreq
client.SignalHighFreq = clientWifictl.SignalHighFreq
if clientWifictl.TryAuth > client.TryAuth {
client.TryAuth = clientWifictl.TryAuth
}
if clientWifictl.TryProbe > client.TryProbe {
client.TryProbe = clientWifictl.TryProbe
}
if client.FreqHighest < clientWifictl.FreqHighest {
ret = (client.FreqHighest != 0)
client.FreqHighest = clientWifictl.FreqHighest
}
if clientWifictl.Authed {
client.Authed = clientWifictl.Authed
}
return ret
}