summaryrefslogtreecommitdiff
path: root/source4/lib/events
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-10-03 14:24:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:18 -0500
commitfaf2ad667a8f973a6422c44fa7431c2fb6e4d82d (patch)
tree3221dd33e654a8d60bdd94c8116ffc122fedf9c5 /source4/lib/events
parente5c6a3e36147103e87d1c55173f4b54ba6134904 (diff)
downloadsamba-faf2ad667a8f973a6422c44fa7431c2fb6e4d82d.tar.gz
samba-faf2ad667a8f973a6422c44fa7431c2fb6e4d82d.tar.bz2
samba-faf2ad667a8f973a6422c44fa7431c2fb6e4d82d.zip
r10684: Add a nasty hack for the failure case of wbinfo -t. Tridge has a proper fix
for it pending. Also fix a bug with timed events: Don't call the same event recursively in the handler's inner semi-async event loop. Volker (This used to be commit e38e50127a3414461578421e676a9c58c106c272)
Diffstat (limited to 'source4/lib/events')
-rw-r--r--source4/lib/events/events_standard.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c
index 8fe8d009bf..146dbc6b22 100644
--- a/source4/lib/events/events_standard.c
+++ b/source4/lib/events/events_standard.c
@@ -347,9 +347,17 @@ static void std_event_loop_timer(struct event_context *ev)
/* deny the handler to free the event */
talloc_set_destructor(te, std_event_timed_deny_destructor);
+
+ /* We need to remove the timer from the list before calling the
+ * handler because in a semi-async inner event loop called from the
+ * handler we don't want to come across this event again -- vl */
+ DLIST_REMOVE(std_ev->timed_events, te);
+
te->handler(ev, te, t, te->private_data);
- talloc_set_destructor(te, std_event_timed_destructor);
+ /* The destructor isn't necessary anymore, we've already removed the
+ * event from the list. */
+
talloc_free(te);
}