[PATCH] osmo-sip-connector[master]: evpoll: Don't try to be more smart than g_poll

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Holger Freyther gerrit-no-reply at lists.osmocom.org
Sat Feb 11 06:09:32 UTC 2017


Review at  https://gerrit.osmocom.org/1797

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
---
M src/evpoll.c
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/97/1797/1

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 @@
 	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 @@
 		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;

-- 
To view, visit https://gerrit.osmocom.org/1797
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c9163f7495e0b237bde2d48beffea3b0776a1dd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>



More information about the gerrit-log mailing list