summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregames <gregames@13f79535-47bb-0310-9956-ffa450edef68>2013-01-21 22:42:32 +0000
committergregames <gregames@13f79535-47bb-0310-9956-ffa450edef68>2013-01-21 22:42:32 +0000
commit9f419dfa6fb591926c12cbff69be8fdaa0112950 (patch)
tree8267b0a1a2d897a51e2247d62ed97bfcd8ab5c1a
parent1e24eb04e2f23845e6a4b12f776d2d82a7676177 (diff)
downloadlibapr-9f419dfa6fb591926c12cbff69be8fdaa0112950.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: http://svn.apache.org/repos/asf/apr/apr/trunk@1436667 13f79535-47bb-0310-9956-ffa450edef68
-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))) {