From: Tomasz Bursztyka Date: Thu, 13 Sep 2012 09:41:54 +0000 (+0300) Subject: technology: Returns the right error when setting tethering X-Git-Tag: 1.7~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b244baab93da9c18e2413c7f0c3fef46c778f39c;p=platform%2Fupstream%2Fconnman.git technology: Returns the right error when setting tethering Fixes BMC#25721 --- diff --git a/src/technology.c b/src/technology.c index 23122f28..3fc7afc1 100644 --- a/src/technology.c +++ b/src/technology.c @@ -712,8 +712,12 @@ static DBusMessage *set_property(DBusConnection *conn, dbus_message_iter_get_basic(&value, &tethering); - if (technology->tethering == tethering) - return __connman_error_already_enabled(msg); + if (technology->tethering == tethering) { + if (tethering == FALSE) + return __connman_error_already_disabled(msg); + else + return __connman_error_already_enabled(msg); + } err = set_tethering(technology, tethering); if (err < 0)