From 1020d4fff525b3618d19b9ad178fcca0da3ebc55 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 15 Dec 2008 02:58:16 +0100 Subject: [PATCH] Make signal strength value available --- plugins/wifi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index 70e19e9..1a057a9 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -299,7 +299,6 @@ static void scan_result(struct connman_element *device, { struct wifi_data *data = connman_element_get_data(device); struct connman_element *element; - guint8 strength = network->quality; gchar *temp; int i; @@ -351,18 +350,22 @@ static void scan_result(struct connman_element *device, element->wifi.security = g_strdup(security); } + element->strength = network->quality; + connman_element_add_static_property(element, "Strength", - DBUS_TYPE_BYTE, &strength); + DBUS_TYPE_BYTE, &element->strength); DBG("%s (%s) strength %d", network->identifier, - element->wifi.security, strength); + element->wifi.security, element->strength); connman_element_register(element, device); } else { data->pending = g_slist_remove(data->pending, element); + element->strength = network->quality; + connman_element_set_static_property(element, "Strength", - DBUS_TYPE_BYTE, &strength); + DBUS_TYPE_BYTE, &element->strength); } data->current = g_slist_append(data->current, element); -- 1.7.9.5