From b244baab93da9c18e2413c7f0c3fef46c778f39c Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Thu, 13 Sep 2012 12:41:54 +0300 Subject: [PATCH] technology: Returns the right error when setting tethering Fixes BMC#25721 --- src/technology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.34.1