Set reconnect to FALSE when power off or disabling the device
authorMartin Xu <martin.xu@intel.com>
Tue, 27 Oct 2009 09:51:07 +0000 (17:51 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 27 Oct 2009 10:35:22 +0000 (19:35 +0900)
src/device.c

index 6b669f2..21ba427 100644 (file)
@@ -326,6 +326,8 @@ static int set_powered(struct connman_device *device, connman_bool_t powered)
        } else {
                device->powered_pending = powered;
 
+               device->reconnect = FALSE;
+
                clear_scan_trigger(device);
 
                g_hash_table_remove_all(device->networks);
@@ -1349,6 +1351,8 @@ int __connman_device_disable(struct connman_device *device)
 
        device->powered_pending = FALSE;
 
+       device->reconnect = FALSE;
+
        clear_scan_trigger(device);
 
        g_hash_table_remove_all(device->networks);