summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2007-09-01 07:27:07 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2007-09-01 07:27:07 +0000
commit79f35b799fec1da8122a8328c703b424118535db (patch)
tree3809b8f7c1ca75ac74ca44cfbca61bb1d1af602a
parentc733362c02d64bee7304a826782b5e94a24b4731 (diff)
downloadlibapr-79f35b799fec1da8122a8328c703b424118535db.tar.gz
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 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@571731 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--file_io/win32/readwrite.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c
index 403fa97fd..5291830aa 100644
--- a/file_io/win32/readwrite.c
+++ b/file_io/win32/readwrite.c
@@ -111,6 +111,9 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
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 */