diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-06-16 17:06:58 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-06-16 17:06:58 +0200 |
commit | 9e3f7729638f7a452f0c4dba5895ac2954c1b3e6 (patch) | |
tree | 8ae11c13a25de1f3ad3c775d6156bcb0ce7b50be /plugins/ofono.c | |
parent | 51de7bc59bb05f965d493b03dd66ba22d126a753 (diff) | |
download | connman-9e3f7729638f7a452f0c4dba5895ac2954c1b3e6.tar.gz connman-9e3f7729638f7a452f0c4dba5895ac2954c1b3e6.tar.bz2 connman-9e3f7729638f7a452f0c4dba5895ac2954c1b3e6.zip |
Track strength changes from oFono's registration interface
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r-- | plugins/ofono.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c index f341ee8d..b6d87ba2 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -381,7 +381,7 @@ static gboolean registration_changed(DBusConnection *connection, const char *path = dbus_message_get_path(message); struct connman_network *network = user_data; DBusMessageIter iter, value; - const char *key, *name; + const char *key; DBG("path %s", path); @@ -397,10 +397,18 @@ static gboolean registration_changed(DBusConnection *connection, if (g_strcmp0(key, "Name") == 0 || g_strcmp0(key, "Operator") == 0) { + const char *name; + dbus_message_iter_get_basic(&value, &name); DBG("name %s", name); connman_network_set_name(network, name); create_service(network); + } else if (g_strcmp0(key, "Strength") == 0) { + connman_uint8_t strength; + + dbus_message_iter_get_basic(&value, &strength); + connman_network_set_strength(network, strength); + create_service(network); } return TRUE; |