bnicholes 2002/07/12 11:53:25
Modified: buckets apr_buckets_pipe.c
Log:
Fixed pipe_bucket_read so that it only set the pipe to nonblocking mode if it
isn't already. Otherwise it messes up the timeout value that may have been
intentionally set by the upstream application.
Revision Changes Path
1.51 +5 -1 apr-util/buckets/apr_buckets_pipe.c
Index: apr_buckets_pipe.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets_pipe.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- apr_buckets_pipe.c 2 Jun 2002 19:54:49 -0000 1.50
+++ apr_buckets_pipe.c 12 Jul 2002 18:53:25 -0000 1.51
@@ -64,7 +64,11 @@
if (block == APR_NONBLOCK_READ) {
apr_file_pipe_timeout_get(p, &timeout);
- apr_file_pipe_timeout_set(p, 0);
+ // Only mess with the timeout if we are in a blocking state
+ // otherwise we are already nonblocking so don't worry about it.
+ if (timeout < 0) {
+ apr_file_pipe_timeout_set(p, 0);
+ }
}
*str = NULL;