diff options
author | Yingan Deng <ying.an.deng@intel.com> | 2010-08-05 16:32:01 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-08-06 15:14:38 +0200 |
commit | d676d2dcc2ab9062bf3c252b67c6e756248c83b9 (patch) | |
tree | 4c074bbfc35afa1f3e44aa8ae64d62a11c22d949 /src | |
parent | d80bf74a55c020f13f668d47ade94a016eb371b6 (diff) | |
download | connman-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')
-rw-r--r-- | src/device.c | 4 |
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); |