projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c444ef2
)
ofono: Set device powered state
author
Daniel Wagner
<daniel.wagner@bmw-carit.de>
Wed, 21 Dec 2011 13:19:30 +0000
(14:19 +0100)
committer
Daniel Wagner
<daniel.wagner@bmw-carit.de>
Thu, 22 Dec 2011 10:10:15 +0000
(11:10 +0100)
plugins/ofono.c
patch
|
blob
|
history
diff --git
a/plugins/ofono.c
b/plugins/ofono.c
index
c27dc1a
..
bdb9b15
100644
(file)
--- 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;