Save profile when enabling device while in offline mode
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 16 Aug 2010 13:09:50 +0000 (15:09 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 16 Aug 2010 13:09:50 +0000 (15:09 +0200)
The profile is no longer offline when doing so and that state change
should be stored.

src/device.c

index 1ab2c3a..e782bb5 100644 (file)
@@ -1097,8 +1097,11 @@ int __connman_device_enable_persistent(struct connman_device *device)
        err = __connman_device_enable(device);
        if (err == 0 || err == -EINPROGRESS) {
                device->offlinemode = FALSE;
-               if (__connman_profile_get_offlinemode() == TRUE)
+               if (__connman_profile_get_offlinemode() == TRUE) {
                        __connman_profile_set_offlinemode(FALSE, FALSE);
+
+                       __connman_profile_save_default();
+               }
        }
 
        return err;