diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-03-16 15:06:52 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-03-17 19:59:07 +0100 |
commit | 6c290586e41b3f5f7748a5b8c782be67cafe6c57 (patch) | |
tree | 6fdc58e62cd396c1e66318d309e089aa4263b832 /source3/lib | |
parent | 66886f8966dff8a980a5b9d2daa3fbb20fe5ca8e (diff) | |
download | samba-6c290586e41b3f5f7748a5b8c782be67cafe6c57.tar.gz samba-6c290586e41b3f5f7748a5b8c782be67cafe6c57.tar.bz2 samba-6c290586e41b3f5f7748a5b8c782be67cafe6c57.zip |
s3:events: add support for immediate events
metze
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/events.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c index d0374121ce..90d86c6c79 100644 --- a/source3/lib/events.c +++ b/source3/lib/events.c @@ -91,6 +91,11 @@ bool run_events(struct tevent_context *ev, return true; } + if (ev->immediate_events && + tevent_common_loop_immediate(ev)) { + return true; + } + GetTimeOfDay(&now); if ((ev->timer_events != NULL) @@ -227,15 +232,16 @@ void dump_event_list(struct tevent_context *ev) } static const struct tevent_ops s3_event_ops = { - .context_init = s3_event_context_init, - .add_fd = tevent_common_add_fd, - .set_fd_close_fn= tevent_common_fd_set_close_fn, - .get_fd_flags = tevent_common_fd_get_flags, - .set_fd_flags = tevent_common_fd_set_flags, - .add_timer = tevent_common_add_timer, - .add_signal = tevent_common_add_signal, - .loop_once = s3_event_loop_once, - .loop_wait = tevent_common_loop_wait, + .context_init = s3_event_context_init, + .add_fd = tevent_common_add_fd, + .set_fd_close_fn = tevent_common_fd_set_close_fn, + .get_fd_flags = tevent_common_fd_get_flags, + .set_fd_flags = tevent_common_fd_set_flags, + .add_timer = tevent_common_add_timer, + .schedule_immediate = tevent_common_schedule_immediate, + .add_signal = tevent_common_add_signal, + .loop_once = s3_event_loop_once, + .loop_wait = tevent_common_loop_wait, }; static bool s3_tevent_init(void) |