diff options
author | Alok Barsode <alok.barsode@linux.intel.com> | 2011-08-24 16:44:07 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-08-25 11:14:20 +0200 |
commit | 16a3c81f6e336ebc5aed1e1462002833aaebc4fa (patch) | |
tree | 1ffd4137722e05dd1f9c105dd451181d1886b080 /src/manager.c | |
parent | ef9c42ac21606bed83eb51c91f110a3aa228690d (diff) | |
download | connman-16a3c81f6e336ebc5aed1e1462002833aaebc4fa.tar.gz connman-16a3c81f6e336ebc5aed1e1462002833aaebc4fa.tar.bz2 connman-16a3c81f6e336ebc5aed1e1462002833aaebc4fa.zip |
technology: Refactor enable/disable APIs
connman_technology_enable: Enable a technology. Enables all the
devices in the device_list of the technology.
connman_technology_enabled: Callback for connman_technology_enable.
Changes the state of the technology to ENABLED.
Ditto for connman_technology_disable/connman_technology_disabled.
Diffstat (limited to 'src/manager.c')
-rw-r--r-- | src/manager.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/manager.c b/src/manager.c index d5542fd8..a276e0b2 100644 --- a/src/manager.c +++ b/src/manager.c @@ -343,8 +343,8 @@ static DBusMessage *enable_technology(DBusConnection *conn, technology_enabled = TRUE; technology_pending = dbus_message_ref(msg); - err = __connman_device_enable_technology(type); - if (err < 0 && err != -EINPROGRESS) + err = __connman_technology_enable(type); + if (err < 0) technology_reply(-err); else technology_timeout = g_timeout_add_seconds(15, @@ -391,8 +391,8 @@ static DBusMessage *disable_technology(DBusConnection *conn, technology_enabled = FALSE; technology_pending = dbus_message_ref(msg); - err = __connman_device_disable_technology(type); - if (err < 0 && err != -EINPROGRESS) + err = __connman_technology_disable(type); + if (err < 0) technology_reply(-err); else technology_timeout = g_timeout_add_seconds(10, |