diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-07-15 17:52:58 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-15 17:52:58 +0200 |
commit | f6fba1e209c93b91ccce9873e7ec187949d15b48 (patch) | |
tree | 021b32c04544edde54a3954241402344db7f1023 /src/technology.c | |
parent | 7eb150988020c7bee0fd1103c43f55d9f2c4f6a9 (diff) | |
download | connman-f6fba1e209c93b91ccce9873e7ec187949d15b48.tar.gz connman-f6fba1e209c93b91ccce9873e7ec187949d15b48.tar.bz2 connman-f6fba1e209c93b91ccce9873e7ec187949d15b48.zip |
Add technology driver callback for setting Tethering
Diffstat (limited to 'src/technology.c')
-rw-r--r-- | src/technology.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/technology.c b/src/technology.c index 23f46cff..0ee91a39 100644 --- a/src/technology.c +++ b/src/technology.c @@ -100,7 +100,7 @@ void connman_technology_driver_unregister(struct connman_technology_driver *driv driver_list = g_slist_remove(driver_list, driver); } -int __connman_technology_enable_tethering(void) +static int set_tethering(connman_bool_t enabled) { GSList *list; @@ -109,23 +109,22 @@ int __connman_technology_enable_tethering(void) if (technology->driver == NULL) continue; + + if (technology->driver->set_tethering) + technology->driver->set_tethering(technology, enabled); } return 0; } -int __connman_technology_disable_tethering(void) +int __connman_technology_enable_tethering(void) { - GSList *list; - - for (list = technology_list; list; list = list->next) { - struct connman_technology *technology = list->data; - - if (technology->driver == NULL) - continue; - } + return set_tethering(TRUE); +} - return 0; +int __connman_technology_disable_tethering(void) +{ + return set_tethering(FALSE); } static void free_rfkill(gpointer data) |