summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-14 00:30:08 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-14 00:30:08 +0100
commit9c4dd9603160c08f38109571d7c6eebfdfc86d83 (patch)
treee8d4594392c494738a2b15d7251a0e790e77c57f /plugins/wifi.c
parent1dcb48fa42e97ec8addb292976887a80ac42e450 (diff)
downloadconnman-9c4dd9603160c08f38109571d7c6eebfdfc86d83.tar.gz
connman-9c4dd9603160c08f38109571d7c6eebfdfc86d83.tar.bz2
connman-9c4dd9603160c08f38109571d7c6eebfdfc86d83.zip
Indicate changes to the signal strength
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r--plugins/wifi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 6dafad47..77d83702 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -299,6 +299,7 @@ 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;
@@ -324,8 +325,6 @@ static void scan_result(struct connman_element *device,
element = find_pending_element(data, network->identifier);
if (element == NULL) {
- guint8 strength;
-
element = connman_element_create(temp);
element->type = CONNMAN_ELEMENT_TYPE_NETWORK;
@@ -352,21 +351,20 @@ static void scan_result(struct connman_element *device,
element->wifi.security = g_strdup(security);
}
- strength = network->quality;
-
connman_element_add_static_property(element, "WiFi.Strength",
DBUS_TYPE_BYTE, &strength);
- //connman_element_add_static_property(element, "WiFi.Noise",
- // DBUS_TYPE_INT32, &network->noise);
-
DBG("%s (%s) strength %d", network->identifier,
element->wifi.security, strength);
connman_element_register(element, device);
- } else
+ } else {
data->pending = g_slist_remove(data->pending, element);
+ connman_element_set_static_property(element, "WiFi.Strength",
+ DBUS_TYPE_BYTE, &strength);
+ }
+
data->current = g_slist_append(data->current, element);
element->available = TRUE;