diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-14 06:21:49 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-14 06:21:49 +0000 |
commit | 622c6aadc1b38a109646c793b4420a52640f5717 (patch) | |
tree | 67e3db7cf912e6dc4fa1b7fd63ae4a01fb9d0f6a | |
parent | b5484dae65d0482ce2a8654f2d8fc2a0531cd565 (diff) | |
download | libapr-622c6aadc1b38a109646c793b4420a52640f5717.tar.gz |
Fix read, if we successfully cancel it's operation aborted.
Write needs to be refactored!!!
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@584493 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | file_io/win32/readwrite.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c index 7aad713c3..35d3739a1 100644 --- a/file_io/win32/readwrite.c +++ b/file_io/win32/readwrite.c @@ -114,8 +114,9 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le } else { rv = apr_get_os_error(); - if (rv == APR_FROM_OS_ERROR(ERROR_IO_INCOMPLETE) - && res == WAIT_TIMEOUT) + if (((rv == APR_FROM_OS_ERROR(ERROR_IO_INCOMPLETE)) + || (rv == APR_FROM_OS_ERROR(ERROR_OPERATION_ABORTED))) + && (res == WAIT_TIMEOUT)) rv = APR_TIMEUP; } } @@ -331,6 +332,8 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a else { (*nbytes) = 0; rv = apr_get_os_error(); + + /* XXX: This must be corrected, per the apr_file_read logic!!! */ if (rv == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) { DWORD timeout_ms; |