diff options
author | Alok Barsode <alok.barsode@linux.intel.com> | 2011-08-24 16:44:08 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-08-25 11:14:20 +0200 |
commit | 6c1c909876d619b39f80c198ccbe3db354890ca2 (patch) | |
tree | 71582fea3eaaf065acc75847c83ccb8c118a81db | |
parent | 16a3c81f6e336ebc5aed1e1462002833aaebc4fa (diff) | |
download | connman-6c1c909876d619b39f80c198ccbe3db354890ca2.tar.gz connman-6c1c909876d619b39f80c198ccbe3db354890ca2.tar.bz2 connman-6c1c909876d619b39f80c198ccbe3db354890ca2.zip |
device: Update profile in enable_persistent callback
-rw-r--r-- | src/device.c | 14 | ||||
-rw-r--r-- | src/technology.c | 5 |
2 files changed, 6 insertions, 13 deletions
diff --git a/src/device.c b/src/device.c index be184e1f..155018a8 100644 --- a/src/device.c +++ b/src/device.c @@ -740,25 +740,13 @@ static int device_scan(struct connman_device *device) int __connman_device_enable_persistent(struct connman_device *device) { - int err; - DBG("device %p", device); device->powered_persistent = TRUE; __connman_storage_save_device(device); - err = __connman_device_enable(device); - if (err == 0 || err == -EINPROGRESS) { - device->offlinemode = FALSE; - if (__connman_profile_get_offlinemode() == TRUE) { - __connman_profile_set_offlinemode(FALSE, FALSE); - - __connman_profile_save_default(); - } - } - - return err; + return __connman_device_enable(device); } int __connman_device_disable_persistent(struct connman_device *device) diff --git a/src/technology.c b/src/technology.c index cb065e2b..2e91b41b 100644 --- a/src/technology.c +++ b/src/technology.c @@ -693,6 +693,11 @@ int __connman_technology_enabled(enum connman_service_type type) state_changed(technology); } + if (__connman_profile_get_offlinemode() == TRUE) { + __connman_profile_set_offlinemode(FALSE, FALSE); + __connman_profile_save_default(); + } + return 0; } |