From: Tomasz Bursztyka Date: Wed, 3 Oct 2012 10:29:13 +0000 (+0300) Subject: technology: Do not apply Powered setting change if hardblock is on X-Git-Tag: 1.8~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a748feddafc79f6f870bf737c81b5bbea5839b2c;p=platform%2Fupstream%2Fconnman.git technology: Do not apply Powered setting change if hardblock is on --- diff --git a/src/technology.c b/src/technology.c index 502cd60..e94e3b9 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,