Ben Laurie <[EMAIL PROTECTED]> writes:
> the end of socket_read (in apr-util/buckets/apr_buckets_socket.c) looks
> like this:
>
> if (*len > 0) {
> b = apr_bucket_socket_create(p);
> APR_BUCKET_INSERT_AFTER(a, b);
> }
> else if (rv == APR_EOF && block == APR_NONBLOCK_READ) {
> return APR_EOF;
> }
> return APR_SUCCESS;
> }
>
> why the test for APR_NONBLOCK_READ? Surely an EOF is an EOF, whatever
> mode you are in? Shouldn't it just return APR_EOF if rv == APR_EOF,
> regardless of mode?
It is simplest if the normal blocking read looks to the caller like an
empty bucket; all the caller needs to know is that no error occurred
and there are no bytes in the bucket; caller doesn't care if it is
some sort of in-memory bucket or socket or pipe or whatever.
--
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...