From: Daniel Wagner <[email protected]>
If free_network is called before the driver->disable() callback
the device has been removed from the networking structure.
---
src/device.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index 39c3fc0..e5bd84d 100644
--- a/src/device.c
+++ b/src/device.c
@@ -271,8 +271,6 @@ int __connman_device_disable(struct connman_device *device)
clear_scan_trigger(device);
- g_hash_table_remove_all(device->networks);
-
err = device->driver->disable(device);
if (err < 0 && err != -EALREADY) {
if (err == -EINPROGRESS)
@@ -280,6 +278,8 @@ int __connman_device_disable(struct connman_device *device)
return err;
}
+ g_hash_table_remove_all(device->networks);
+
device->connections = 0;
device->powered_pending = FALSE;
--
1.7.6
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman