summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authorstoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68>2001-05-02 19:59:54 +0000
committerstoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68>2001-05-02 19:59:54 +0000
commit5a65a2c807363e220262ac79e44a9a81ed7d0a79 (patch)
tree39b6c6f41ca271c5ab17dd7a97cb2f8c705fee53 /network_io
parentf738a7ccce9af790f75582b77b903b73daf3c9dc (diff)
downloadlibapr-5a65a2c807363e220262ac79e44a9a81ed7d0a79.tar.gz
APRize WAIT_TIMEOUT before return from apr_sendfile()
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61582 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/win32/sendrecv.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/network_io/win32/sendrecv.c b/network_io/win32/sendrecv.c
index 8f26e07c4..812475d63 100644
--- a/network_io/win32/sendrecv.c
+++ b/network_io/win32/sendrecv.c
@@ -332,9 +332,16 @@ APR_DECLARE(apr_status_t) apr_sendfile(apr_socket_t *sock, apr_file_t *file,
if (rv == WAIT_OBJECT_0)
status = APR_SUCCESS;
else if (rv == WAIT_TIMEOUT)
- status = WAIT_TIMEOUT;
- else if (rv == WAIT_ABANDONED)
- status = WAIT_ABANDONED;
+ status = APR_FROM_OS_ERROR(WAIT_TIMEOUT);
+ else if (rv == WAIT_ABANDONED) {
+ /* Hummm... WAIT_ABANDONDED is not an error code. It is
+ * a return specific to the Win32 WAIT functions that
+ * indicates that a thread exited while holding a
+ * mutex. Should consider triggering an assert
+ * to detect the condition...
+ */
+ status = APR_FROM_OS_ERROR(WAIT_TIMEOUT);
+ }
else
status = apr_get_os_error();
}