summaryrefslogtreecommitdiff
path: root/plugins/ofono.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-12-21 14:19:30 +0100
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2011-12-22 11:10:15 +0100
commitef87a4f96d63ca66cde962d62af45e633144ca51 (patch)
tree99d2b98c2e947c383f40a00024a2119560a276fb /plugins/ofono.c
parentc444ef294e46ce96f5120d6ed8b9429ace095cce (diff)
downloadconnman-ef87a4f96d63ca66cde962d62af45e633144ca51.tar.gz
connman-ef87a4f96d63ca66cde962d62af45e633144ca51.tar.bz2
connman-ef87a4f96d63ca66cde962d62af45e633144ca51.zip
ofono: Set device powered state
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r--plugins/ofono.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c
index c27dc1ac..bdb9b155 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -932,6 +932,7 @@ static void create_device(struct modem_data *modem)
modem->device = device;
+ connman_device_set_powered(modem->device, modem->online);
out:
g_free(ident);
}
@@ -1974,6 +1975,11 @@ static gboolean modem_changed(DBusConnection *connection, DBusMessage *message,
dbus_message_iter_get_basic(&value, &modem->online);
DBG("%s Online %d", modem->path, modem->online);
+
+ if (modem->device == NULL)
+ return TRUE;
+
+ connman_device_set_powered(modem->device, modem->online);
} else if (g_str_equal(key, "Interfaces") == TRUE) {
uint8_t interfaces;