summaryrefslogtreecommitdiff
path: root/lib/tevent
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tevent')
-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) {