Less syslog errors

I've been seeing a succession of 3 syslog errors every time my wireless card tries to scan for APs and can't find any. This then results in various "edit some AP list" routines failing certain assertions. The attached patch fixes two of them (basically by checking that we've got *some* ap data before calling the copy and destroy routines).

The third one is driving me nuts. The assertion is the "dest!=NULL" at the top of nm_ap_list_copy_properties (line 426 of NetworkManagerAPList.c), which is being called by nm_device_do_normal_scan at roughly line 2445 of NetworkManagerDevice.c. The source is also NULL, and I've tried checking the value of dev->app_data->allowed_ap_list (the source) before the routine is called, but it doesn't help. I thought the problem was the call to nm_device_ap_list_get messing around with the dev structure, but calling and storing the return value before calling nm_ap_list_copy_properties doesn't help.

Any ideas anyone?

Index: src/NetworkManagerDevice.c
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerDevice.c,v
retrieving revision 1.61
diff -u -r1.61 NetworkManagerDevice.c
--- src/NetworkManagerDevice.c	11 Nov 2004 02:24:04 -0000	1.61
+++ src/NetworkManagerDevice.c	13 Nov 2004 14:03:51 -0000
@@ -2458,7 +2458,7 @@
 		 * Some Cisco cards don't report non-ESSID-broadcasting access points in their scans even though
 		 * the card associates with that AP just fine.
-		if ((iter = nm_ap_list_iter_new (old_ap_list)))
+		if (old_ap_list && (iter = nm_ap_list_iter_new (old_ap_list)))
 			char *essid = nm_device_get_essid (dev);
@@ -2474,7 +2474,8 @@
 			nm_ap_list_iter_free (iter);
-		nm_ap_list_unref (old_ap_list);
+		if (old_ap_list)
+			nm_ap_list_unref (old_ap_list);
 		/* Generate the "old" list from the 3rd and 4th oldest scans we've done */
 		old_ap_list = nm_ap_list_combine (dev->options.wireless.cached_ap_list3, earliest_scan);

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