From 4643af525974fc58cccc2ca6d4fcba3132c415eb Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Wed, 25 Jul 2018 14:50:47 +0200 Subject: [PATCH] learn all values --- database/client.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/database/client.go b/database/client.go index d2c8d10..b98b379 100644 --- a/database/client.go +++ b/database/client.go @@ -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 }