diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2012-10-03 13:29:13 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-10-03 13:45:20 +0300 |
commit | a748feddafc79f6f870bf737c81b5bbea5839b2c (patch) | |
tree | 08d3dac394ab6a14354d814e08fedd91ae78e161 /src/technology.c | |
parent | 4fe4b7622eb8225adfa79f658cf49bb391da3e04 (diff) | |
download | connman-a748feddafc79f6f870bf737c81b5bbea5839b2c.tar.gz connman-a748feddafc79f6f870bf737c81b5bbea5839b2c.tar.bz2 connman-a748feddafc79f6f870bf737c81b5bbea5839b2c.zip |
technology: Do not apply Powered setting change if hardblock is on
Diffstat (limited to 'src/technology.c')
-rw-r--r-- | src/technology.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/technology.c b/src/technology.c index 502cd605..e94e3b97 100644 --- 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, |