From: Daniel Wagner <[email protected]>
The fix for BMC#22307 (Clear network pointer in wifi) added
to network_remove() the wifi->network = NULL pointer assigment.
For this we need to lookup the device pointer first from the network
object.
This will not work anymore because connman_network_get_device()
will always return a NULL pointer now.
Therefore move the wifi->network = NULL asigment to network_removed()
which is the origin for entering in network_remove() anyway.
---
plugins/wifi.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 912e1ee..14db227 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -626,19 +626,7 @@ static int network_probe(struct connman_network *network)
static void network_remove(struct connman_network *network)
{
- struct connman_device *device = connman_network_get_device(network);
- struct wifi_data *wifi;
-
DBG("network %p", network);
-
- wifi = connman_device_get_data(device);
- if (wifi == NULL)
- return;
-
- if (wifi->network != network)
- return;
-
- wifi->network = NULL;
}
static void connect_callback(int result, GSupplicantInterface *interface,
@@ -1210,6 +1198,7 @@ static void network_removed(GSupplicantNetwork *network)
connman_device_remove_network(wifi->device, connman_network);
connman_network_unref(connman_network);
+ wifi->network = NULL;
}
static void network_changed(GSupplicantNetwork *network, const char *property)
--
1.7.10.rc3.1.gb3065
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman