From fc1a7591bdcd64a3df1d2db29afca8e224f64c0a Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 22 Aug 2019 21:40:19 +0900 Subject: estream: Fix poll condition. * src/estream.c (_gpgrt_poll): Fix for want_oob. Signed-off-by: NIIBE Yutaka --- src/estream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/estream.c b/src/estream.c index 4c66b67..4ec5695 100644 --- a/src/estream.c +++ b/src/estream.c @@ -4866,8 +4866,8 @@ _gpgrt_poll (gpgrt_poll_t *fds, unsigned int nfds, int timeout) { poll_fds[poll_nfds].fd = fd; poll_fds[poll_nfds].events = ((item->want_read ? POLLIN : 0) - | (item->want_write ? POLLOUT : 0) - |(item->want_read ? POLLPRI : 0)); + |(item->want_write ? POLLOUT : 0) + |(item->want_oob ? POLLPRI : 0)); poll_fds[poll_nfds].revents = 0; poll_nfds++; } @@ -4995,7 +4995,8 @@ _gpgrt_poll (gpgrt_poll_t *fds, unsigned int nfds, int timeout) any = 1; } - poll_nfds++; + if (item->want_read || item->want_write || item->want_oob) + poll_nfds++; if (any) count++; } -- cgit v1.2.3