summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-06-16 17:06:58 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-06-16 17:06:58 +0200
commit9e3f7729638f7a452f0c4dba5895ac2954c1b3e6 (patch)
tree8ae11c13a25de1f3ad3c775d6156bcb0ce7b50be
parent51de7bc59bb05f965d493b03dd66ba22d126a753 (diff)
downloadconnman-9e3f7729638f7a452f0c4dba5895ac2954c1b3e6.tar.gz
Track strength changes from oFono's registration interface
-rw-r--r--plugins/ofono.c10
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;