bugfix: regression: Networks that have not been seen in long time still show up in wifi scan.

Regression of changeset:e34b7fcee49c3e2b7eb35aa4fb44b6abdc78b3ad/aredn_ar71xx

Having moved to iw for iwinfo we have a regression previous commit.

Restore fix that if not seen after 10 seconds signal drops from display.
This commit is contained in:
Conrad Lara - KG6JEI 2015-07-19 23:34:06 -07:00
parent 661dc23e18
commit 9aec7e019b
1 changed files with 4 additions and 2 deletions

View File

@ -175,7 +175,7 @@ while(1)
{
if($line =~ /BSS\s+(([[:xdigit:]]{2}:){5}[[:xdigit:]]{2})/)
{
pushAP($signal, $chan, $key, $ssid, $host, $mac, $mode);
if ( $lastseen < 10000 ) { pushAP($signal, $chan, $key, $ssid, $host, $mac, $mode) }
$mac = uc $1;
$mode = "";
@ -183,6 +183,7 @@ while(1)
$signal = 0;
$chan = "";
$key = "";
$lastseen = 0;
}
@ -198,11 +199,12 @@ while(1)
if($line =~ /\bfreq: (\d+)/) { $chan = $1 }
if($line =~ /\bsignal: ([\d-]+)/) { $signal = $1 }
if($line =~ /\bGroup cipher:(.+)/) { $key = $1 }
if($line =~ /\blast seen: (\d+)/) { $lastseen = $1 }
}
close(FILE);
pushAP($signal, $chan, $key, $ssid, $host, $mac, $mode);
if ( $lastseen < 10000 ) { pushAP($signal, $chan, $key, $ssid, $host, $mac, $mode) }
sleep 1 if not scalar @list and $loops != 1;
$mac = "";