From: Samuel Ortiz Date: Wed, 16 Jun 2010 15:06:58 +0000 (+0200) Subject: Track strength changes from oFono's registration interface X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~2698 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e3f7729638f7a452f0c4dba5895ac2954c1b3e6;p=profile%2Fivi%2Fconnman.git Track strength changes from oFono's registration interface --- 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;