On Tue, 27 Nov 2001, Doug MacEachern wrote:
> ok. then how about a new apr_file_xread() function and changing
> bucket_read to use it?
>
> apr_status_t apr_file_xread(apr_file_t **f, void *buf,
> apr_size_t *nbytes, apr_off_t *offset,
> apr_pool_t *pool)
> {
Hmmm... doesn't quite seem right. How would you know when it was
appropriate to call apr_file_xread() rather than apr_file_read()? When
the file might be XTHREAD. But that's any time. :) So we're really
talking about replacing apr_file_read(), no? Either this logic would go
at the top of the existing apr_file_read() [whose argument list would
obviously change], or the existing apr_file_read() would become some
function private to APR that we call [we might do it that way to avoid
having to duplicate this logic across all APR platforms, for example].
Still, does it really seem right for apr_file_read() to change the
apr_file_t that was passed to it, not really. But that doesn't answer the
original question of when you'd call apr_file_xread over apr_file_read...
Anyhow, I'm willing to be convinced that this should be pushed down into
APR from APR-util in some way. It definitely shouldn't go UP into Apache,
though.
--Cliff
--------------------------------------------------------------
Cliff Woolley
[EMAIL PROTECTED]
Charlottesville, VA