summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-09-08 19:23:51 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-09-08 20:06:22 +0200
commitf8186de4ecb4f3c8de194597b03260d60fee247b (patch)
treee2996050778f88d84d45743e7ac230b979989edf /src/device.c
parentd0f182311216691dceb6c096194600c72c098826 (diff)
downloadconnman-f8186de4ecb4f3c8de194597b03260d60fee247b.tar.gz
connman-f8186de4ecb4f3c8de194597b03260d60fee247b.tar.bz2
connman-f8186de4ecb4f3c8de194597b03260d60fee247b.zip
Set the devices offline mode to FALSE when setting the Powered property
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index db24f954..89762364 100644
--- a/src/device.c
+++ b/src/device.c
@@ -218,13 +218,20 @@ int __connman_device_enable(struct connman_device *device)
err = device->driver->enable(device);
if (err < 0) {
- if (err == -EINPROGRESS)
+ if (err == -EINPROGRESS) {
device->powered_pending = TRUE;
+ device->offlinemode = FALSE;
+ if (__connman_profile_get_offlinemode() == TRUE)
+ __connman_profile_set_offlinemode(FALSE, FALSE);
+ }
return err;
}
device->powered_pending = TRUE;
device->powered = TRUE;
+ device->offlinemode = FALSE;
+ if (__connman_profile_get_offlinemode() == TRUE)
+ __connman_profile_set_offlinemode(FALSE, FALSE);
__connman_technology_enable_device(device);