network-manager-applet r1159 - in trunk: . src



Author: dcbw
Date: Fri Feb 13 17:42:24 2009
New Revision: 1159
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=1159&view=rev

Log:
2009-02-13  Dan Williams  <dcbw redhat com>

	* src/applet-device-wifi.c
		- (add_one_ap_menu_item): fix max signal strength calculation with
			 multiple APs of the same SSID (rh #475123)



Modified:
   trunk/ChangeLog
   trunk/src/applet-device-wifi.c

Modified: trunk/src/applet-device-wifi.c
==============================================================================
--- trunk/src/applet-device-wifi.c	(original)
+++ trunk/src/applet-device-wifi.c	Fri Feb 13 17:42:24 2009
@@ -560,7 +560,6 @@
                       NMApplet *applet)
 {
 	const GByteArray *ssid;
-	gint8 strength;
 	struct dup_data dup_data = { NULL, NULL };
 	NMNetworkMenuItem *item = NULL;
 
@@ -569,8 +568,6 @@
 	if (!ssid || nm_utils_is_empty_ssid (ssid->data, ssid->len))
 		return;
 
-	strength = nm_access_point_get_strength (ap);
-
 	dup_data.found = NULL;
 	dup_data.hash = g_object_get_data (G_OBJECT (ap), "hash");
 	if (!dup_data.hash)
@@ -581,10 +578,12 @@
 	                       &dup_data);
 
 	if (dup_data.found) {
+		gint8 strength = nm_access_point_get_strength (ap);
+
 		item = NM_NETWORK_MENU_ITEM (dup_data.found);
 
 		/* Just update strength if greater than what's there */
-		if (nm_network_menu_item_get_strength (item) > strength)
+		if (nm_network_menu_item_get_strength (item) < strength)
 			nm_network_menu_item_set_strength (item, strength);
 
 		nm_network_menu_item_add_dupe (item, ap);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]