diff options
author | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2002-07-13 07:11:19 +0000 |
---|---|---|
committer | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2002-07-13 07:11:19 +0000 |
commit | 62b4458ca69ded36bc181d931c386af702b18e09 (patch) | |
tree | 695650da7b7eaa0afae261fc874f29004ca87371 /poll/os2 | |
parent | 0312133eb52c80c0d1b7c75f4f8e47b7f90d4766 (diff) | |
download | libapr-62b4458ca69ded36bc181d931c386af702b18e09.tar.gz |
Fix socket counts after a socket has been removed from the poll set.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63651 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll/os2')
-rwxr-xr-x | poll/os2/poll.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/poll/os2/poll.c b/poll/os2/poll.c index 54b0be29e..02f53b196 100755 --- a/poll/os2/poll.c +++ b/poll/os2/poll.c @@ -65,9 +65,11 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t num, int pos_read, pos_write, pos_except; for (i = 0; i < num; i++) { - num_read += (aprset[i].reqevents & APR_POLLIN) != 0; - num_write += (aprset[i].reqevents & APR_POLLOUT) != 0; - num_except += (aprset[i].reqevents & APR_POLLPRI) != 0; + if (aprset[i].desc_type == APR_POLL_SOCKET) { + num_read += (aprset[i].reqevents & APR_POLLIN) != 0; + num_write += (aprset[i].reqevents & APR_POLLOUT) != 0; + num_except += (aprset[i].reqevents & APR_POLLPRI) != 0; + } } num_total = num_read + num_write + num_except; |