aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-02-11 13:06:32 +0700
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-02-11 13:06:32 +0700
commit42b073a233740e0e0125e99e4bea29ac7d3d27ed (patch)
treef3a72dc533bbae11f7354abe701654695e423ca1
parente19f9ce39fdf299944da41d754c78e34e86611af (diff)
evpoll: Don't try to be more smart than g_poll
gpoll.c:g_poll maps G_IO_PRI (which is POLLPRI) to the errorfds of the select call. Let's do the same. Change-Id: I8c9163f7495e0b237bde2d48beffea3b0776a1dd Related: OS#1934
-rw-r--r--src/evpoll.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/evpoll.c b/src/evpoll.c
index a4b8a80..3273bd0 100644
--- a/src/evpoll.c
+++ b/src/evpoll.c
@@ -43,15 +43,15 @@ int evpoll(struct pollfd *fds, nfds_t nfds, int timeout)
for (i = 0; i < nfds; ++i) {
if (fds[i].fd < 0)
continue;
- if ((fds[i].events & (POLLIN | POLLOUT | POLLERR)) == 0)
+ if ((fds[i].events & (POLLIN | POLLOUT | POLLPRI)) == 0)
continue;
- /* copy events, glib seems to map POLLPRI to exceptionset? */
+ /* copy events. Not sure why glib maps PRI to exceptionset */
if (fds[i].events & POLLIN)
FD_SET(fds[i].fd, &readset);
if (fds[i].events & POLLOUT)
FD_SET(fds[i].fd, &writeset);
- if (fds[i].events & POLLERR)
+ if (fds[i].events & POLLPRI)
FD_SET(fds[i].fd, &exceptset);
if (fds[i].fd > maxfd)
@@ -102,7 +102,7 @@ int evpoll(struct pollfd *fds, nfds_t nfds, int timeout)
if (FD_ISSET(fds[i].fd, &writeset))
fds[i].revents |= POLLOUT;
if (FD_ISSET(fds[i].fd, &exceptset))
- fds[i].revents |= POLLERR;
+ fds[i].revents |= POLLPRI;
}
return rc;