summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingan Deng <ying.an.deng@intel.com>2010-08-05 14:32:01 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-06 13:14:38 (GMT)
commitd676d2dcc2ab9062bf3c252b67c6e756248c83b9 (patch)
tree4c074bbfc35afa1f3e44aa8ae64d62a11c22d949
parentd80bf74a55c020f13f668d47ade94a016eb371b6 (diff)
downloadconnman-d676d2dcc2ab9062bf3c252b67c6e756248c83b9.zip
connman-d676d2dcc2ab9062bf3c252b67c6e756248c83b9.tar.gz
connman-d676d2dcc2ab9062bf3c252b67c6e756248c83b9.tar.bz2
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.
-rw-r--r--src/device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index 87e3533..c1d74b6 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);