NetworkManager r3517 - trunk/test



Author: dcbw
Date: Mon Mar 31 14:56:57 2008
New Revision: 3517
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3517&view=rev

Log:
Only clear AP list if it exists

Modified:
   trunk/test/nm-tool.c

Modified: trunk/test/nm-tool.c
==============================================================================
--- trunk/test/nm-tool.c	(original)
+++ trunk/test/nm-tool.c	Mon Mar 31 14:56:57 2008
@@ -262,7 +262,8 @@
 		printf ("\n  Wireless Access Points%s\n", active_ap ? "(* = Current AP)" : "");
 
 		aps = nm_device_802_11_wireless_get_access_points (NM_DEVICE_802_11_WIRELESS (device));
-		g_ptr_array_foreach ((GPtrArray *) aps, detail_access_point, (gpointer) active_bssid);
+		if (aps && aps->len)
+			g_ptr_array_foreach ((GPtrArray *) aps, detail_access_point, (gpointer) active_bssid);
 	} else if (NM_IS_DEVICE_802_3_ETHERNET (device)) {
 		printf ("\n  Wired Settings\n");
 		/* FIXME */



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