summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--network_io/unix/poll.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index ce6f3e6e2..f9ece7f3b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
Changes with APR b1
+ *) Fix a logic error in the poll code when implemented using select.
+ [Nick Caruso <ncaruso@gamesville.com>]
+
*) FreeBSD does not support sendfile() in combination with threads
before version 4.2. We no longer even try to support it.
[Ryan Bloom]
diff --git a/network_io/unix/poll.c b/network_io/unix/poll.c
index dce36448c..c3305e8d8 100644
--- a/network_io/unix/poll.c
+++ b/network_io/unix/poll.c
@@ -246,7 +246,7 @@ apr_status_t apr_add_poll_socket(apr_pollfd_t *aprset,
FD_SET(sock->socketdes, aprset->read);
}
if (event & APR_POLLPRI) {
- FD_SET(sock->socketdes, aprset->read);
+ FD_SET(sock->socketdes, aprset->except);
}
if (event & APR_POLLOUT) {
FD_SET(sock->socketdes, aprset->write);
@@ -351,7 +351,7 @@ apr_status_t apr_get_revents(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_
apr_status_t apr_remove_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock)
{
FD_CLR(sock->socketdes, aprset->read);
- FD_CLR(sock->socketdes, aprset->read);
+ FD_CLR(sock->socketdes, aprset->except);
FD_CLR(sock->socketdes, aprset->write);
return APR_SUCCESS;
}
@@ -362,7 +362,7 @@ apr_status_t apr_clear_poll_sockets(apr_pollfd_t *aprset, apr_int16_t event)
FD_ZERO(aprset->read);
}
if (event & APR_POLLPRI) {
- FD_ZERO(aprset->read);
+ FD_ZERO(aprset->except);
}
if (event & APR_POLLOUT) {
FD_ZERO(aprset->write);