Skip to content

Commit

Permalink
Merge pull request #6461 from mmohtashamirad/fix_stale_scan_result_in…
Browse files Browse the repository at this point in the history
…_channel_analysis

luci-mod-status: channel_analysis.js: fix stale scan result.
  • Loading branch information
jow- authored Jul 13, 2023
2 parents 8f09004 + 03f1684 commit 6c259f7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ return view.extend({
scanCache[results[i].bssid] = {};

scanCache[results[i].bssid].data = results[i];
scanCache[results[i].bssid].data.stale = false;
}

if (scanCache[local_wifi.bssid] == null)
Expand Down Expand Up @@ -226,7 +227,7 @@ return view.extend({
}

for (var k in scanCache)
if (scanCache[k].stale)
if (scanCache[k].data.stale)
results.push(scanCache[k].data);

results.sort(function(a, b) {
Expand Down Expand Up @@ -302,7 +303,7 @@ return view.extend({
E('span', { 'style': s }, '%h'.format(res.bssid))
]);

res.stale = true;
scanCache[results[i].bssid].data.stale = true;
}

cbi_update_table(table, rows);
Expand Down

0 comments on commit 6c259f7

Please sign in to comment.