summaryrefslogtreecommitdiff
path: root/poll/unix/poll.c
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2003-01-03 17:06:07 +0000
committerBrian Pane <brianp@apache.org>2003-01-03 17:06:07 +0000
commitdf8d8054bd056d67ecad83951a986a859d267638 (patch)
treecffcc71a24abd27fe7e488b7efdf8331bfcb28fa /poll/unix/poll.c
parent2eeca2074100fa3d0edf695953c273d9689b17a5 (diff)
downloadapr-df8d8054bd056d67ecad83951a986a859d267638.tar.gz
fix the clearing of the pollset in the select-based implementation
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64261 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll/unix/poll.c')
-rw-r--r--poll/unix/poll.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index 6241a4c61..899aa71ab 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -275,8 +275,8 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
}
#endif
- for (i = 0; i < *nsds; i++) {
- aprset[i].rtnevents = 0;
+ for (i = 0; i < num; i++) {
+ aprset[i].rtnevents = 0;
}
(*nsds) = rv;
@@ -303,7 +303,6 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
else {
break;
}
- aprset[i].rtnevents = 0;
if (FD_ISSET(fd, &readset)) {
aprset[i].rtnevents |= APR_POLLIN;
}