From d676d2dcc2ab9062bf3c252b67c6e756248c83b9 Mon Sep 17 00:00:00 2001 From: Yingan Deng Date: Thu, 5 Aug 2010 16:32:01 +0200 Subject: [PATCH] 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. --- src/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.7.4