Device is not offline when enabled succeeds or is in progress
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 12 Aug 2010 11:03:11 +0000 (13:03 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 12 Aug 2010 11:03:11 +0000 (13:03 +0200)
src/device.c

index 7633cee..fcbfd86 100644 (file)
@@ -1092,11 +1092,9 @@ int __connman_device_enable_persistent(struct connman_device *device)
 
        err = __connman_device_enable(device);
        if (err == 0 || err == -EINPROGRESS) {
-               if (__connman_profile_get_offlinemode() == TRUE) {
-                       device->offlinemode = FALSE;
+               device->offlinemode = FALSE;
+               if (__connman_profile_get_offlinemode() == TRUE)
                        __connman_profile_set_offlinemode(FALSE, FALSE);
-               }
-
        }
 
        return err;