]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Resurrect the old API of eventDelete(func, NULL) deleting all events with that callback
authorhno <>
Sat, 2 Sep 2006 05:56:38 +0000 (05:56 +0000)
committerhno <>
Sat, 2 Sep 2006 05:56:38 +0000 (05:56 +0000)
The eventApi defines eventDelete(func, NULL) as a wildcard delete. Mainly
used on shutdown etc.

src/event.cc

index d6fccd769456e03fff1a59c854633d8522fdee35..dbcc890e17021b174e61f64edeb71c14d2571e2f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: event.cc,v 1.43 2006/08/21 00:50:41 robertc Exp $
+ * $Id: event.cc,v 1.44 2006/09/01 23:56:38 hno Exp $
  *
  * DEBUG: section 41    Event Processing
  * AUTHOR: Henrik Nordstrom
@@ -163,7 +163,7 @@ EventScheduler::cancel(EVH * func, void *arg)
         if (event->func != func)
             continue;
 
-        if (event->arg != arg)
+        if (arg && event->arg != arg)
             continue;
 
         *E = event->next;
@@ -173,10 +173,12 @@ EventScheduler::cancel(EVH * func, void *arg)
 
         delete event;
 
-        return;
+       if (arg)
+           return;
     }
 
-    debug_trap("eventDelete: event not found");
+    if (arg)
+       debug_trap("eventDelete: event not found");
 }
 
 int