[g-a-devel] broken remove-listener-by-callback



Rather a trivial patch:

	HTH,

		Michael.

diff -u -r1.472 ChangeLog
--- ChangeLog	25 May 2005 10:52:59 -0000	1.472
+++ ChangeLog	26 May 2005 13:44:06 -0000
@@ -1,3 +1,8 @@
+2005-05-26  Michael Meeks  <michael meeks novell com>
+
+	* cspi/bonobo/cspi-bonobo-listener.c
+	(cspi_event_list_remove_by_cb): actually filter by callback.
+
 2005-05-25  Michael Meeks  <michael meeks novell com>
 
 	* registryd/registry.c (remove_listener_cb),

diff -u -r1.23 cspi-bonobo-listener.c
--- cspi/bonobo/cspi-bonobo-listener.c	14 Apr 2005 17:35:24 -0000	1.23
+++ cspi/bonobo/cspi-bonobo-listener.c	26 May 2005 13:44:06 -0000
@@ -71,10 +71,12 @@
     {
       EventHandler *eh = l->data;
       next = l->next;
-      
-      list = g_list_delete_link (list, l);
-      
-      cspi_event_handler_free (eh);
+
+      if (eh->method == callback)
+      {
+        list = g_list_delete_link (list, l);
+	cspi_event_handler_free (eh);
+      }
     }
 
   return list;


-- 
 michael meeks novell com  <><, Pseudo Engineer, itinerant idiot




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