From fe4930b7fae084b664eef2342cf1e4b6a3daf698 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 1 Apr 2008 15:29:59 +0200 Subject: Enable multiple fd events on a single file descriptor Now we can have multiple events listen on a single fd. The order in which they are called is naturally not defined, meaning that it is only deterministic if exactly one event is readable or writeable. (This used to be commit 61503f822b60f98dd1f7549707ec89b48e32caeb) --- source3/lib/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/lib/events.c b/source3/lib/events.c index f7bad9bcad..9decf213b4 100644 --- a/source3/lib/events.c +++ b/source3/lib/events.c @@ -292,7 +292,7 @@ bool run_events(struct event_context *event_ctx, if (FD_ISSET(fde->fd, read_fds)) flags |= EVENT_FD_READ; if (FD_ISSET(fde->fd, write_fds)) flags |= EVENT_FD_WRITE; - if (flags) { + if (flags & fde->flags) { fde->handler(event_ctx, fde, flags, fde->private_data); fired = True; } -- cgit