device: Set PENDING_DISABLE on device disable
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 2 Sep 2011 10:34:57 +0000 (13:34 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 12 Sep 2011 09:40:49 +0000 (11:40 +0200)
Set powered pending state to PENDING_DISABLE when the device is
being disabled.

src/device.c

index d8ab1fc..ec60449 100644 (file)
@@ -294,6 +294,7 @@ int __connman_device_disable(struct connman_device *device)
        if (device->powered_pending == PENDING_NONE && device->powered == FALSE)
                return -EALREADY;
 
+       device->powered_pending = PENDING_DISABLE;
        device->reconnect = FALSE;
 
        clear_scan_trigger(device);