hal/hald/linux osspec.c,1.39,1.40

David Zeuthen david at freedesktop.org
Tue Sep 7 12:55:32 PDT 2004


Update of /cvs/hal/hal/hald/linux
In directory gabe:/tmp/cvs-serv9658/hald/linux

Modified Files:
	osspec.c 
Log Message:
2004-09-07  David Zeuthen  <david at fubar.dk>

	* hald/linux/osspec.c (hald_helper_hotplug_process_queue): Check
	for duplicate events and ignore them



Index: osspec.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/osspec.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- osspec.c	31 Aug 2004 22:55:44 -0000	1.39
+++ osspec.c	7 Sep 2004 19:55:20 -0000	1.40
@@ -1250,6 +1250,17 @@
 	for (i = hotplug_queue; i != NULL; i = g_list_next (i)) {
 		msg = (struct hald_helper_msg *) i->data;
 
+		/* check for dupes (user may have several hal.hotplug helpers (!) */
+		if (msg->seqnum == last_hotplug_seqnum) {
+			HAL_WARNING (("******************************************"));
+			HAL_WARNING (("Ignoring duplicate event with SEQNUM=%d", msg->seqnum));
+			HAL_WARNING (("******************************************"));
+			g_free (msg);
+			hotplug_queue = g_list_delete_link (hotplug_queue, i);
+			goto trynext;
+		}
+
+
 		if (msg->seqnum == last_hotplug_seqnum + 1) {
 			/* yup, found it */
 			last_hotplug_seqnum = msg->seqnum;




More information about the hal-commit mailing list