apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject svn commit: r930671 - /apr/apr/trunk/file_io/os2/readwrite.c
Date Sun, 04 Apr 2010 12:30:09 GMT
Author: bjh
Date: Sun Apr  4 12:30:08 2010
New Revision: 930671

URL: http://svn.apache.org/viewvc?rev=930671&view=rev
Log:
OS/2: Fix incorrect returning of APR_EOF when a 0 length read is requested.

Modified:
    apr/apr/trunk/file_io/os2/readwrite.c

Modified: apr/apr/trunk/file_io/os2/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/readwrite.c?rev=930671&r1=930670&r2=930671&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/readwrite.c (original)
+++ apr/apr/trunk/file_io/os2/readwrite.c Sun Apr  4 12:30:08 2010
@@ -46,6 +46,7 @@ APR_DECLARE(apr_status_t) apr_file_read(
 {
     ULONG rc = 0;
     ULONG bytesread;
+    apr_size_t req_nbytes = *nbytes;
 
     if (!thefile->isopen) {
         *nbytes = 0;
@@ -129,7 +130,7 @@ APR_DECLARE(apr_status_t) apr_file_read(
 
         *nbytes = bytesread;
         
-        if (bytesread == 0) {
+        if (bytesread == 0 && req_nbytes > 0) {
             thefile->eof_hit = TRUE;
             return APR_EOF;
         }



Mime
View raw message