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:
4fe4b76
)
technology: Do not apply Powered setting change if hardblock is on
author
Tomasz Bursztyka
<tomasz.bursztyka@linux.intel.com>
Wed, 3 Oct 2012 10:29:13 +0000
(13:29 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Wed, 3 Oct 2012 10:45:20 +0000
(13:45 +0300)
src/technology.c
patch
|
blob
|
history
diff --git
a/src/technology.c
b/src/technology.c
index
502cd60
..
e94e3b9
100644
(file)
--- a/
src/technology.c
+++ b/
src/technology.c
@@
-650,7
+650,12
@@
static DBusMessage *set_powered(struct connman_technology *technology,
DBusMessage *msg, connman_bool_t powered)
{
DBusMessage *reply = NULL;
- int err;
+ int err = 0;
+
+ if (technology->hardblocked == TRUE) {
+ err = -EACCES;
+ goto make_reply;
+ }
if (powered == TRUE)
err = technology_enable(technology, FALSE);
@@
-662,6
+667,7
@@
static DBusMessage *set_powered(struct connman_technology *technology,
technology_save(technology);
}
+make_reply:
if (err == -EINPROGRESS) {
technology->pending_reply = dbus_message_ref(msg);
technology->pending_timeout = g_timeout_add_seconds(10,