int __connman_device_enable_persistent(struct connman_device *device)
{
+ int err;
+
DBG("device %p", device);
device->powered_persistent = TRUE;
- if (__connman_profile_get_offlinemode() == TRUE)
- __connman_profile_set_offlinemode(FALSE, FALSE);
-
__connman_storage_save_device(device);
- return __connman_device_enable(device);
+ err = __connman_device_enable(device);
+ if (err == 0 || err == -EINPROGRESS) {
+ if (__connman_profile_get_offlinemode() == TRUE)
+ __connman_profile_set_offlinemode(FALSE, FALSE);
+
+ }
+
+ return err;
}
int __connman_device_disable(struct connman_device *device)