diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-06-21 13:39:16 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-06-25 09:47:58 +0300 |
commit | 6dbc417d259aa0c4a08b1d345fa7425c9b165df2 (patch) | |
tree | 78ecd3327938a283afd51075babf1d2c5155883e /src | |
parent | e7b42e962124436a492d5ffd1a060cee042f486d (diff) | |
download | connman-6dbc417d259aa0c4a08b1d345fa7425c9b165df2.tar.gz connman-6dbc417d259aa0c4a08b1d345fa7425c9b165df2.tar.bz2 connman-6dbc417d259aa0c4a08b1d345fa7425c9b165df2.zip |
technology: Return proper error code when already enabled
We do not call the generic error message function because
it maps EALREADY to EINPROGRESS. So instead we call correct
error return function which returns AlreadyEnabled to the
caller.
Fixes BMC#25306
Diffstat (limited to 'src')
-rw-r--r-- | src/technology.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/technology.c b/src/technology.c index be688f2f..013ac785 100644 --- a/src/technology.c +++ b/src/technology.c @@ -609,7 +609,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_enabled(msg); + else + reply = __connman_error_failed(msg, -err); if (reply != NULL) g_dbus_send_message(connection, reply); } |