projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c6ac17
)
Toggle offline mode only if device enablement succeeds
author
Ying An Deng
<ying.an.deng@intel.com>
Tue, 3 Aug 2010 14:48:33 +0000
(16:48 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Tue, 3 Aug 2010 15:31:52 +0000
(17:31 +0200)
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
fc72544
..
aab0c83
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-1056,16
+1056,22
@@
int __connman_device_enable(struct connman_device *device)
int __connman_device_enable_persistent(struct connman_device *device)
{
int __connman_device_enable_persistent(struct connman_device *device)
{
+ int err;
+
DBG("device %p", device);
device->powered_persistent = TRUE;
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);
__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)
}
int __connman_device_disable(struct connman_device *device)