aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2019-08-22 12:40:19 +0000
committerNIIBE Yutaka <[email protected]>2019-08-22 12:40:19 +0000
commitfc1a7591bdcd64a3df1d2db29afca8e224f64c0a (patch)
tree572848762b248d0fb16cc4b7f7f769d0df52c57b
parentNew error codes NO_KEYBOXD, KEYBOXD, NO_SERVICE, and SERVICE. (diff)
downloadlibgpg-error-fc1a7591bdcd64a3df1d2db29afca8e224f64c0a.tar.gz
libgpg-error-fc1a7591bdcd64a3df1d2db29afca8e224f64c0a.zip
estream: Fix poll condition.
* src/estream.c (_gpgrt_poll): Fix for want_oob. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--src/estream.c7
1 files 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++;
}