diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-15 03:24:03 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-15 03:24:03 +0100 |
commit | 91b02d3430e53b5bf7d974e37cd60102a93f92ad (patch) | |
tree | 268a6cd727c56493cefee112528addf2d110d27b /plugins/wifi.c | |
parent | 9d1ab587994ff1cab91c4cace94ed76114059a50 (diff) | |
download | connman-91b02d3430e53b5bf7d974e37cd60102a93f92ad.tar.gz connman-91b02d3430e53b5bf7d974e37cd60102a93f92ad.tar.bz2 connman-91b02d3430e53b5bf7d974e37cd60102a93f92ad.zip |
Only update signal strength when it changes
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r-- | plugins/wifi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index 4459a27c..b7eea7b1 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -362,12 +362,14 @@ static void scan_result(struct connman_element *device, } else { data->pending = g_slist_remove(data->pending, element); - element->strength = network->quality; + if (element->strength != network->quality) { + element->strength = network->quality; - connman_element_set_static_property(element, "Strength", + connman_element_set_static_property(element, "Strength", DBUS_TYPE_BYTE, &element->strength); - connman_element_update(element); + connman_element_update(element); + } } data->current = g_slist_append(data->current, element); |