apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r584493 - /apr/apr/trunk/file_io/win32/readwrite.c
Date Sun, 14 Oct 2007 06:21:50 GMT
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;



Mime
View raw message