From eeec6109833571f275a9adc220b5bbb05d1cb2bd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 15 Jul 2004 10:07:05 +0000 Subject: r1517: change event_remove_timed() to remove by structure not by handler. this fixes a crash bug in smbd with multiple RPC clients (This used to be commit 6e102f732e4404fc5f9b2851d12b00d2d083b43d) --- source4/lib/events.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source4/lib/events.c b/source4/lib/events.c index 50f3f53c94..13a9a444e8 100644 --- a/source4/lib/events.c +++ b/source4/lib/events.c @@ -186,15 +186,13 @@ struct timed_event *event_add_timed(struct event_context *ev, struct timed_event /* remove a timed event - the event to remove is matched only on the handler function return False on failure (event not found) */ BOOL event_remove_timed(struct event_context *ev, struct timed_event *e1) { struct timed_event *e; for (e=ev->timed_events; e; e=e->next) { - if (e->ref_count && - e->handler == e1->handler) { + if (e->ref_count && e == e1) { e->ref_count--; return True; } -- cgit