summaryrefslogtreecommitdiff
path: root/poll
diff options
context:
space:
mode:
authorGreg Ames <gregames@apache.org>2013-01-21 22:42:32 +0000
committerGreg Ames <gregames@apache.org>2013-01-21 22:42:32 +0000
commitee69ee1b39b1951effa2f90b54e0b470e232a29d (patch)
tree8267b0a1a2d897a51e2247d62ed97bfcd8ab5c1a /poll
parent3b87c3b9d7254467d8f3e8da3591bcddbf00582f (diff)
downloadapr-ee69ee1b39b1951effa2f90b54e0b470e232a29d.tar.gz
* don't just initialize cancel_a, use it for the asyncio AIO_CANCEL call
* reset the state to ASIO_INIT after finding something that wasn't apr_pollset_remove'd on the prior ready ring thanks to Pat O'Donnell / IBM for debugging assistance git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1436667 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r--poll/unix/z_asio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/poll/unix/z_asio.c b/poll/unix/z_asio.c
index 15b05060d..cdce230e5 100644
--- a/poll/unix/z_asio.c
+++ b/poll/unix/z_asio.c
@@ -511,7 +511,7 @@ static apr_status_t asio_pollset_remove(apr_pollset_t *pollset,
* to eliminate race conditions
*/
- rv = asyncio(&elem->a);
+ rv = asyncio(&cancel_a);
DBG1(4, "asyncio returned %d\n", rv);
#if DEBUG
@@ -640,6 +640,7 @@ static apr_status_t asio_pollset_poll(apr_pollset_t *pollset,
continue; /* do not re-add if it has been _removed */
}
+ elem->state = ASIO_INIT;
elem->a.aio_cflags = AIO_OK2COMPIMD;
if (0 != (ret = asyncio(&elem->a))) {