apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject clean up apr_file_read semantics
Date Fri, 04 May 2001 06:39:12 GMT
Currently, apr_file_io.h states that apr_file_read() can return bytes *and*
return APR_EOF at the same time. However, all the implementations will
return APR_EOF only when nbytes == 0.

I'd like to fix the comment in apr_file_io.h to state that when APR_EOF is
returned, that nbytes will be zero.

Thoughts?

Cheers,
-g

p.s. I believe there is a bug in win32/readwrite.c::apr_file_read(). In the
buffered case, if rv == APR_EOF, then it breaks out of the loop. If *len is
found to be zero, then rv is set to 0 (APR_SUCCESS). I don't see how APR_EOF
could be returned from that function.

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message