[patch] don't display very-low-strength APs.
- From: Robert Love <rml novell com>
- To: networkmanager-list gnome org
- Subject: [patch] don't display very-low-strength APs.
- Date: Mon, 11 Jul 2005 15:47:25 -0400
As featured in several award-winning news reports[1], Cambridge has a
lot of wireless networks. I finally got strength working on the Cisco
AiroNet card, and I see that many of those networks have no strength
whatsoever.
My Mac only shows a few access points, effectively filtering the crappy
access points out.
Attached patch filters out access points at or below 1% strength. In
addition to not displaying worthless AP's, this keeps the number of
transient networks down--less falling in and out of display.
The one concern is if any wireless cards with broken strength detection
return zero for all strength. I've only seen 100% returned, so I think
this is okay.
If so, may I apply?
Robert Love
[1] http://rlove.org/images/networkmanager-20050622.png
Index: gnome/applet/applet.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
retrieving revision 1.24
diff -u -r1.24 applet.c
--- gnome/applet/applet.c 8 Jul 2005 02:37:10 -0000 1.24
+++ gnome/applet/applet.c 11 Jul 2005 19:42:39 -0000
@@ -1568,6 +1568,10 @@
g_return_if_fail (cb_data->menu != NULL);
g_return_if_fail (cb_data->applet != NULL);
+ /* Filter out networks at or below 1% strength. */
+ if (CLAMP (wireless_network_get_strength (net), 0, 100) <= 1)
+ return;
+
item = network_menu_item_new (cb_data->applet->encryption_size_group);
gtk_item = network_menu_item_get_check_item (item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]