diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-12-21 10:05:57 +0100 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-12-22 11:10:15 +0100 |
commit | 08cf0d0f1c417c1cd66aaddf54116cef52ffffb4 (patch) | |
tree | b315ba9bb0111bbd4d7a66649e57937f34c1c267 /plugins | |
parent | 8318518054ab1ec69daff6ceddfbb30a55964937 (diff) | |
download | connman-08cf0d0f1c417c1cd66aaddf54116cef52ffffb4.tar.gz connman-08cf0d0f1c417c1cd66aaddf54116cef52ffffb4.tar.bz2 connman-08cf0d0f1c417c1cd66aaddf54116cef52ffffb4.zip |
ofono: Remove unused set_online
Also follow the patternt that we have only a set function
with an argument for the value tos set.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ofono.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c index 2494bd7d..037524ac 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -126,7 +126,6 @@ struct modem_data { connman_bool_t ignore; connman_bool_t set_powered; - connman_bool_t set_online; /* CDMA ConnectionManager Interface */ connman_bool_t cdma_cm_powered; @@ -564,33 +563,15 @@ static int cdma_cm_set_powered(struct modem_data *modem, connman_bool_t powered) return err; } -static void modem_set_online_reply(struct modem_data *modem, - connman_bool_t success) +static int modem_set_online(struct modem_data *modem, connman_bool_t online) { - DBG("%s", modem->path); - - if (success == TRUE) { - /* - * Don't handle do anything on success here. oFono will send - * the change via PropertyChanged singal. - */ - return; - } - - modem->set_online = FALSE; -} - -static int modem_set_online(struct modem_data *modem) -{ - DBG("%s", modem->path); - - modem->set_online = TRUE; + DBG("%s online %d", modem->path, online); return set_property(modem, modem->path, OFONO_MODEM_INTERFACE, "Online", DBUS_TYPE_BOOLEAN, - &modem->set_online, - modem_set_online_reply); + &online, + NULL); } static void cm_set_powered_reply(struct modem_data *modem, @@ -1836,7 +1817,7 @@ static gboolean sim_changed(DBusConnection *connection, DBusMessage *message, sim_update_imsi(modem, &value); if (modem->online == FALSE) { - modem_set_online(modem); + modem_set_online(modem, TRUE); } else if (has_interface(modem->interfaces, OFONO_API_CM) == TRUE) { if (ready_to_create_device(modem) == TRUE) @@ -1870,7 +1851,7 @@ static void sim_properties_reply(struct modem_data *modem, sim_update_imsi(modem, &value); if (modem->online == FALSE) { - modem_set_online(modem); + modem_set_online(modem, TRUE); break; } |