r5123: fixed a bug in the timed events handling. It was possible for a timed
authorAndrew Tridgell <tridge@samba.org>
Mon, 31 Jan 2005 08:18:52 +0000 (08:18 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:25 +0000 (13:09 -0500)
commit58d6c73e946d11574a6220f37887e1cdfe05f525
tree6d26d4ee20261610328bee5f513f7df1171dfa8e
parent26bf3063d3250aba60ba458efd131e5a24006363
r5123: fixed a bug in the timed events handling. It was possible for a timed
event handler to trigger a free that could cause a timer to be
triggered twice. This changs fixes it properly by marking timer events
to be removed using a zero next_event time.

I also changed the default timeout for events.c to be infinite, so if
there are no events to handle then smbd will sit forever doing
nothing. That allows it to be swapped out completely when idle.
(This used to be commit 0f1fb7017ee441cbebcad45900435adb57ca1760)
source4/lib/events.c
source4/lib/time.c