From 08cf0d0f1c417c1cd66aaddf54116cef52ffffb4 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Wed, 21 Dec 2011 10:05:57 +0100 Subject: [PATCH] ofono: Remove unused set_online Also follow the patternt that we have only a set function with an argument for the value tos set. --- plugins/ofono.c | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index 2494bd7..037524a 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; } -- 2.7.4