projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cabd8f
)
device: Remove power pending timeout iff there is a pending request
author
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 25 Aug 2011 15:34:06 +0000
(17:34 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 25 Aug 2011 16:44:27 +0000
(18:44 +0200)
In the ethernet case, there won't be any.
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
cdd9118
..
a5b815f
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-663,9
+663,12
@@
int connman_device_set_powered(struct connman_device *device,
if (device->powered == powered)
return -EALREADY;
- /* Reset pending request */
- g_source_remove(device->pending_timeout);
- device->pending_timeout = 0;
+ if (device->pending_timeout) {
+ /* Reset pending request */
+ g_source_remove(device->pending_timeout);
+ device->pending_timeout = 0;
+ }
+
device->powered_pending = PENDING_NONE;
device->powered = powered;