summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68>2006-01-26 21:46:30 +0000
committerrooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68>2006-01-26 21:46:30 +0000
commit00d0773d9d559f6759b41b65fdcb023d2282803f (patch)
tree258588515bebd9fe4d541bb78d778b06ab863f6c
parent2f41c8e0925b1826c4a6b450823118cd08818dc8 (diff)
downloadlibapr-00d0773d9d559f6759b41b65fdcb023d2282803f.tar.gz
Merge r355790 to 0.9.x.
Original log message: Fix handling of EOF for unbuffered reads on win32. * file_io/win32/readwrite.c (apr_file_read): In the unbuffered case, set thefile->eof_true if we hit EOF. * CHANGES: note Change. Submitted by: Konstantin Sharenkov <Konstantin.Sharenkov at enterra-inc.com> Reviewed by: wrowe, rooneg git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@372618 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--file_io/win32/readwrite.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 011de1e45..4c26a3668 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ Changes with APR 0.9.8-dev
*) Fix assertion from double close of a handle with a rwlock on win32.
[Evgueni Brevnov <evgueni.brevnov gmail.com>]
+ *) Fix EOF handling for unbuffered reads on win32.
+ [Konstantin Sharenkov <Konstantin.Sharenkov enterra-inc.com>]
+
*) Documented that apr_stat and apr_dir_read can return APR_INCOMPLETE,
and how to determine which parts of the resulting apr_finfo_t can be
used in such a case.
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c
index c3352defa..988c21f4f 100644
--- a/file_io/win32/readwrite.c
+++ b/file_io/win32/readwrite.c
@@ -204,6 +204,8 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
/* Unbuffered i/o */
apr_size_t nbytes;
rv = read_with_timeout(thefile, buf, *len, &nbytes);
+ if (rv == APR_EOF)
+ thefile->eof_hit = TRUE;
*len = nbytes;
}