summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-20 17:17:31 +0100
committerJeremy Allison <jra@samba.org>2013-03-01 12:01:13 -0800
commit8b1a43ece8f056d7063a3d7accc5894f380bd018 (patch)
treec1395f593f49aa77389db0e75b13c43acaff0c97
parenta347d55f506541e18b95cf3e7c1e83f2c665ee91 (diff)
downloadsamba-8b1a43ece8f056d7063a3d7accc5894f380bd018.tar.gz
samba-8b1a43ece8f056d7063a3d7accc5894f380bd018.tar.bz2
samba-8b1a43ece8f056d7063a3d7accc5894f380bd018.zip
tevent: handle EPOLL_ADDITIONAL_FD_FLAG_HAS_MPX in epoll_update_event()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--lib/tevent/tevent_epoll.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/tevent/tevent_epoll.c b/lib/tevent/tevent_epoll.c
index b1927d3197..3608d4b622 100644
--- a/lib/tevent/tevent_epoll.c
+++ b/lib/tevent/tevent_epoll.c
@@ -545,6 +545,23 @@ static void epoll_update_event(struct epoll_event_context *epoll_ev, struct teve
bool got_error = (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR);
bool want_read = (fde->flags & TEVENT_FD_READ);
bool want_write= (fde->flags & TEVENT_FD_WRITE);
+ struct tevent_fd *mpx_fde = NULL;
+
+ if (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_HAS_MPX) {
+ /*
+ * work out what the multiplexed fde wants.
+ */
+ mpx_fde = talloc_get_type_abort(fde->additional_data,
+ struct tevent_fd);
+
+ if (mpx_fde->flags & TEVENT_FD_READ) {
+ want_read = true;
+ }
+
+ if (mpx_fde->flags & TEVENT_FD_WRITE) {
+ want_write = true;
+ }
+ }
/* there's already an event */
if (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_HAS_EVENT) {