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/09/01 09:26:44 UTC

svn commit: r571729 - /apr/apr/branches/1.2.x/file_io/win32/readwrite.c

Author: wrowe
Date: Sat Sep  1 00:26:44 2007
New Revision: 571729

URL: http://svn.apache.org/viewvc?rev=571729&view=rev
Log:
Correctly handle completion-based read-to-EOF case.
Resolves testfile, still have testpipe and testproc
to contend with.

Submitted by: Steven Naim <steven.naim googlemail.com>
Backports: r571728

Modified:
    apr/apr/branches/1.2.x/file_io/win32/readwrite.c

Modified: apr/apr/branches/1.2.x/file_io/win32/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/file_io/win32/readwrite.c?rev=571729&r1=571728&r2=571729&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/file_io/win32/readwrite.c (original)
+++ apr/apr/branches/1.2.x/file_io/win32/readwrite.c Sat Sep  1 00:26:44 2007
@@ -117,6 +117,9 @@
         else if (rv == APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE)) {
             /* Assume ERROR_BROKEN_PIPE signals an EOF reading from a pipe */
             rv = APR_EOF;
+        } else if (rv == APR_FROM_OS_ERROR(ERROR_HANDLE_EOF)) {
+            /* Did we hit EOF reading from the handle? */
+            rv = APR_EOF;
         }
     } else {
         /* OK and 0 bytes read ==> end of file */