diff options
author | ben <ben@13f79535-47bb-0310-9956-ffa450edef68> | 1999-10-10 13:15:58 +0000 |
---|---|---|
committer | ben <ben@13f79535-47bb-0310-9956-ffa450edef68> | 1999-10-10 13:15:58 +0000 |
commit | c7d0c124f2a18a87badc0eff4bf25457a781dadd (patch) | |
tree | 06347251d8cdddf6c5e5d8ef7ba003b2eb49f3c0 /network_io/unix/poll.c | |
parent | 78b883f88d7195e867c434d71a209d82d5138337 (diff) | |
download | libapr-c7d0c124f2a18a87badc0eff4bf25457a781dadd.tar.gz |
Use the correct size for the pollset.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59297 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io/unix/poll.c')
-rw-r--r-- | network_io/unix/poll.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/network_io/unix/poll.c b/network_io/unix/poll.c index a206fbaf8..10163f3de 100644 --- a/network_io/unix/poll.c +++ b/network_io/unix/poll.c @@ -176,7 +176,7 @@ ap_status_t ap_poll(struct pollfd_t *aprset, ap_int32_t *nsds, ap_int32_t timeou pollset = (struct pollfd *)ap_palloc(aprset->cntxt, sizeof(struct pollfd) * (*nsds)); - for (i = 0; i < (*nsds); i++) { + for (i = 0; i < aprset->curpos; i++) { pollset[i].fd = aprset->sock[i]; pollset[i].events = aprset->events[i]; } @@ -185,10 +185,10 @@ ap_status_t ap_poll(struct pollfd_t *aprset, ap_int32_t *nsds, ap_int32_t timeou timeout *= 1000; } - rv = poll(pollset, (*nsds), timeout); + rv = poll(pollset, aprset->curpos, timeout); (*nsds) = rv; - for (i = 0; i < (*nsds); i++) { + for (i = 0; i < aprset->curpos; i++) { aprset->revents[i] = get_revent(pollset[i].revents); } |