From 9e3f7729638f7a452f0c4dba5895ac2954c1b3e6 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Wed, 16 Jun 2010 17:06:58 +0200 Subject: [PATCH] Track strength changes from oFono's registration interface --- plugins/ofono.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index f341ee8..b6d87ba 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; -- 2.7.4