summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-07-15 10:07:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:38 -0500
commiteeec6109833571f275a9adc220b5bbb05d1cb2bd (patch)
treedadc4cda9dda23eccf5e306ab89bb749028fe2cc
parent7a0e61f38ea6b13f1f45e89f6f160d6c32f08617 (diff)
downloadsamba-eeec6109833571f275a9adc220b5bbb05d1cb2bd.tar.gz
samba-eeec6109833571f275a9adc220b5bbb05d1cb2bd.tar.bz2
samba-eeec6109833571f275a9adc220b5bbb05d1cb2bd.zip
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)
-rw-r--r--source4/lib/events.c4
1 files changed, 1 insertions, 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;
}