summaryrefslogtreecommitdiff
path: root/lib/tevent/tevent_fd.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-03 11:27:00 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-03 19:58:51 +0100
commite45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd (patch)
tree87cc211ffd1b8354299ab720446dec89e8b1c18a /lib/tevent/tevent_fd.c
parente928d863e2bb654d16ac9094e3406ef6a207c023 (diff)
downloadsamba-e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd.tar.gz
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_fd.c')
-rw-r--r--lib/tevent/tevent_fd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tevent/tevent_fd.c b/lib/tevent/tevent_fd.c
index eb9cdab531a..d450e2168de 100644
--- a/lib/tevent/tevent_fd.c
+++ b/lib/tevent/tevent_fd.c
@@ -34,3 +34,9 @@ void tevent_common_fd_set_flags(struct tevent_fd *fde, uint16_t flags)
if (fde->flags == flags) return;
fde->flags = flags;
}
+
+void tevent_common_fd_set_close_fn(struct tevent_fd *fde,
+ tevent_fd_close_fn_t close_fn)
+{
+ fde->close_fn = close_fn;
+}