Below is a patch for:
http://bugs.meego.com/show_bug.cgi?id=11561

When wpa_supplicant indicates that a BSS has been removed by sending a 
BSSRemoved signal to ConnMan, the WiFi plugin does not remove the respective 
network and service structures for this BSS. As a result the network is still 
listed by 'test-connman services' and the wpa_supplicant BSSs list and the WiFi 
AP list get out of sync. 

Initiating a network removal in WiFi plugin by invoking 
connman_device_remove_network in network_removed callback will fix this issue.

---
 plugins/wifi.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 2b43deb..9190023 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -468,9 +468,18 @@ static void network_added(GSupplicantNetwork 
*supplicant_network)
 
 static void network_removed(GSupplicantNetwork *network)
 {
-       const char *name = g_supplicant_network_get_name(network);
+       GSupplicantInterface *interface;
+       struct wifi_data *wifi;
+       const char *name, *identifier;
+
+       interface = g_supplicant_network_get_interface(network);
+       wifi = g_supplicant_interface_get_data(interface);
+       identifier = g_supplicant_network_get_identifier(network);
+       name = g_supplicant_network_get_name(network);
 
        DBG("* name %s", name);
+
+       connman_device_remove_network(wifi->device, identifier);
 }
 
 static void debug(const char *str)
-- 
1.7.2.2


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to