From 3d72128f5b988ca0f214163fda8ecbf26ffb498c Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Thu, 21 Jun 2012 13:39:17 +0300 Subject: [PATCH] technology: Return proper error code when already disabled Return AlreadyDisabled to the caller instead of InProgress if we are already disabled. --- src/technology.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/technology.c b/src/technology.c index 013ac78..3781b0c 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); } -- 2.7.4