summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-09-13 12:41:54 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-09-13 13:42:31 +0300
commitb244baab93da9c18e2413c7f0c3fef46c778f39c (patch)
tree5a0e5f5f5888b528ba5a0ac8a9a95e6e6685cfd4
parentab9cc2faadf73cb7ace797af5529b9841c6d3adc (diff)
downloadconnman-b244baab93da9c18e2413c7f0c3fef46c778f39c.tar.gz
connman-b244baab93da9c18e2413c7f0c3fef46c778f39c.tar.bz2
connman-b244baab93da9c18e2413c7f0c3fef46c778f39c.zip
technology: Returns the right error when setting tethering
Fixes BMC#25721
-rw-r--r--src/technology.c8
1 files 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)