projects
/
profile
/
ivi
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb41ed2
)
Store the current blocked state internally
author
Marcel Holtmann
<marcel@holtmann.org>
Wed, 22 Jul 2009 18:47:05 +0000
(20:47 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Wed, 22 Jul 2009 18:47:05 +0000
(20:47 +0200)
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
e6a9a03
..
48aca8b
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-38,6
+38,7
@@
struct connman_device {
enum connman_device_mode mode;
connman_bool_t secondary;
connman_bool_t offlinemode;
+ connman_bool_t blocked;
connman_bool_t powered;
connman_bool_t powered_persistent;
connman_bool_t carrier;
@@
-1198,6
+1199,11
@@
int __connman_device_set_blocked(struct connman_device *device,
DBG("device %p blocked %d", device, blocked);
+ if (device->blocked == blocked)
+ return -EALREADY;
+
+ device->blocked = blocked;
+
if (device->offlinemode == TRUE)
return 0;