summaryrefslogtreecommitdiff
path: root/plugins/ofono.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-12-21 10:09:19 +0100
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2011-12-22 11:10:15 +0100
commitf675a144de254cdaac3a36b6e7a83fa94e770e76 (patch)
tree18a065b0ca3c652325b1b3c18a5930212b791848 /plugins/ofono.c
parent0488e7e72ca018e1de47ac727fff4d5dafd3e5b5 (diff)
downloadconnman-f675a144de254cdaac3a36b6e7a83fa94e770e76.tar.gz
connman-f675a144de254cdaac3a36b6e7a83fa94e770e76.tar.bz2
connman-f675a144de254cdaac3a36b6e7a83fa94e770e76.zip
ofono: Enable and disable the modem through online interface
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r--plugins/ofono.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c
index 4d5c7ab9..47a4b998 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -1830,12 +1830,6 @@ static void sim_properties_reply(struct modem_data *modem,
if (g_str_equal(key, "SubscriberIdentity") == TRUE) {
sim_update_imsi(modem, &value);
-
- if (modem->online == FALSE) {
- modem_set_online(modem, TRUE);
- break;
- }
-
connection_manager_init(modem);
return;
@@ -2298,7 +2292,10 @@ static int modem_enable(struct connman_device *device)
DBG("%s device %p", modem->path, device);
- return 0;
+ if (modem->online == TRUE)
+ return 0;
+
+ return modem_set_online(modem, TRUE);
}
static int modem_disable(struct connman_device *device)
@@ -2307,7 +2304,10 @@ static int modem_disable(struct connman_device *device)
DBG("%s device %p", modem->path, device);
- return 0;
+ if (modem->online == FALSE)
+ return 0;
+
+ return modem_set_online(modem, FALSE);
}
static struct connman_device_driver modem_driver = {