summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-06-21 13:39:17 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-06-25 09:48:00 +0300
commit3d72128f5b988ca0f214163fda8ecbf26ffb498c (patch)
tree9170b96786e26d28fb92d5b96c771a39a35db0ee
parent6dbc417d259aa0c4a08b1d345fa7425c9b165df2 (diff)
downloadconnman-3d72128f5b988ca0f214163fda8ecbf26ffb498c.tar.gz
connman-3d72128f5b988ca0f214163fda8ecbf26ffb498c.tar.bz2
connman-3d72128f5b988ca0f214163fda8ecbf26ffb498c.zip
technology: Return proper error code when already disabled
Return AlreadyDisabled to the caller instead of InProgress if we are already disabled.
-rw-r--r--src/technology.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/technology.c b/src/technology.c
index 013ac785..3781b0c1 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -673,7 +673,10 @@ done:
technology->pending_timeout = g_timeout_add_seconds(10,
technology_pending_reply, technology);
} else {
- reply = __connman_error_failed(msg, -err);
+ if (err == -EALREADY)
+ reply = __connman_error_already_disabled(msg);
+ else
+ reply = __connman_error_failed(msg, -err);
if (reply != NULL)
g_dbus_send_message(connection, reply);
}