summaryrefslogtreecommitdiff
path: root/lib/tevent/tevent.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-22 12:45:39 +0100
committerJeremy Allison <jra@samba.org>2013-03-01 12:01:54 -0800
commit35385a3e28850d0915e8cf2883871ae2101526f1 (patch)
tree79cc502e6efe9bca3d84a8663d202fe80aa71e60 /lib/tevent/tevent.c
parentafd4198bf1ee5877a660d42e615e06d895690161 (diff)
downloadsamba-35385a3e28850d0915e8cf2883871ae2101526f1.tar.gz
samba-35385a3e28850d0915e8cf2883871ae2101526f1.tar.bz2
samba-35385a3e28850d0915e8cf2883871ae2101526f1.zip
tevent: optimize adding new zero timer events
Such events were used before we had immediate events. It's likely that there're a lot of this events and we need to add new ones in fifo order. The tricky part is that tevent_common_add_timer() should not use the optimization as it's used by broken Samba versions, which don't use tevent_common_loop_timer_delay() in source3/lib/events.c. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/tevent/tevent.c')
-rw-r--r--lib/tevent/tevent.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 63d5f1536c..be0afd453b 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -190,6 +190,7 @@ int tevent_common_context_destructor(struct tevent_context *ev)
DLIST_REMOVE(ev->fd_events, fd);
}
+ ev->last_zero_timer = NULL;
for (te = ev->timer_events; te; te = tn) {
tn = te->next;
te->event_ctx = NULL;