summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorYingan Deng <ying.an.deng@intel.com>2010-08-05 16:32:01 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-06 15:14:38 +0200
commitd676d2dcc2ab9062bf3c252b67c6e756248c83b9 (patch)
tree4c074bbfc35afa1f3e44aa8ae64d62a11c22d949 /src/device.c
parentd80bf74a55c020f13f668d47ade94a016eb371b6 (diff)
downloadconnman-d676d2dcc2ab9062bf3c252b67c6e756248c83b9.tar.gz
connman-d676d2dcc2ab9062bf3c252b67c6e756248c83b9.tar.bz2
connman-d676d2dcc2ab9062bf3c252b67c6e756248c83b9.zip
If device is powered, set powered_pending from device_set_powered
If connman_device_set_powered() is called when the device is already powered, powered_pending should be set to the same value.
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index 87e3533b..c1d74b67 100644
--- a/src/device.c
+++ b/src/device.c
@@ -989,8 +989,10 @@ int connman_device_set_powered(struct connman_device *device,
device->pending = NULL;
}
- if (device->powered == powered)
+ if (device->powered == powered) {
+ device->powered_pending = powered;
return -EALREADY;
+ }
if (powered == TRUE)
__connman_device_enable(device);