You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2007/10/14 08:21:50 UTC
svn commit: r584493 - /apr/apr/trunk/file_io/win32/readwrite.c
Author: wrowe
Date: Sat Oct 13 23:21:49 2007
New Revision: 584493
URL: http://svn.apache.org/viewvc?rev=584493&view=rev
Log:
Fix read, if we successfully cancel it's operation aborted.
Write needs to be refactored!!!
Modified:
apr/apr/trunk/file_io/win32/readwrite.c
Modified: apr/apr/trunk/file_io/win32/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/win32/readwrite.c?rev=584493&r1=584492&r2=584493&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/readwrite.c (original)
+++ apr/apr/trunk/file_io/win32/readwrite.c Sat Oct 13 23:21:49 2007
@@ -114,8 +114,9 @@
}
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 @@
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;