summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Espy <espy@canonical.com>2015-10-29 15:15:09 +0100
committerLubomir Rintel <lkundrak@v3.sk>2015-10-30 10:17:17 +0100
commit340f1336e343a96e3f0a52f866253b034be6c2cd (patch)
tree85f99d0b0775e130066fb5e36765c02e8457dbf2
parent66a94ac601e7223ed0f59dbd3ec613b4c0910722 (diff)
downloadNetworkManager-340f1336e343a96e3f0a52f866253b034be6c2cd.tar.gz
Remove APs when wpa_supplicant removes them
This patch modifies NMDeviceWiFi's cull_scan_list function such that APs are removed when the WPAS_REMOVED_TAG is detected. This leads to earleir removal of APs that are no longer present. Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1425172
-rw-r--r--src/devices/wifi/nm-device-wifi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index 0fbc832b5c..6b6af56834 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -1789,9 +1789,12 @@ cull_scan_list (NMDeviceWifi *self)
* and we'll end up here even if the AP was still found by the
* supplicant in the last scan.
*/
- if ( nm_ap_get_supplicant_path (ap)
- && g_object_get_data (G_OBJECT (ap), WPAS_REMOVED_TAG) == NULL) {
- nm_ap_set_last_seen (ap, nm_utils_get_monotonic_timestamp_s ());
+ if ( nm_ap_get_supplicant_path (ap)) {
+ if (g_object_get_data (G_OBJECT (ap), WPAS_REMOVED_TAG) == NULL)
+ nm_ap_set_last_seen (ap, nm_utils_get_monotonic_timestamp_s ());
+ else
+ outdated_list = g_slist_prepend (outdated_list, ap);
+
continue;
}