diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-01-03 11:27:00 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-01-03 19:58:51 +0100 |
commit | e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd (patch) | |
tree | 87cc211ffd1b8354299ab720446dec89e8b1c18a /lib/tevent/tevent.c | |
parent | e928d863e2bb654d16ac9094e3406ef6a207c023 (diff) | |
download | samba-e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd.tar.gz samba-e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd.tar.bz2 samba-e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd.zip |
tevent: add tevent_fd_set_close_fn()
Let callers specify a close function
as an alternative to TEVENT_FD_AUTOCLOSE.
metze
Diffstat (limited to 'lib/tevent/tevent.c')
-rw-r--r-- | lib/tevent/tevent.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c index 9319177646..93918cc14d 100644 --- a/lib/tevent/tevent.c +++ b/lib/tevent/tevent.c @@ -241,6 +241,16 @@ struct tevent_aio *_tevent_add_aio(struct tevent_context *ev, } /* + set a close function on the fd event +*/ +void tevent_fd_set_close_fn(struct tevent_fd *fde, + tevent_fd_close_fn_t close_fn) +{ + if (!fde) return; + fde->event_ctx->ops->set_fd_close_fn(fde, close_fn); +} + +/* return the fd event flags */ uint16_t tevent_fd_get_flags(struct tevent_fd *fde) |