apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr-util/buckets apr_buckets_socket.c
Date Mon, 15 Jul 2002 22:18:06 GMT
bnicholes    2002/07/15 15:18:06

  Modified:    buckets  apr_buckets_socket.c
  Log:
  Fixed socket_bucket_read so that it only set the socket 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.  This matches the same change
  that was made in pipe_bucket_read.
  
  Revision  Changes    Path
  1.42      +6 -1      apr-util/buckets/apr_buckets_socket.c
  
  Index: apr_buckets_socket.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_socket.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- apr_buckets_socket.c	15 Jul 2002 07:56:13 -0000	1.41
  +++ apr_buckets_socket.c	15 Jul 2002 22:18:06 -0000	1.42
  @@ -64,7 +64,12 @@
   
       if (block == APR_NONBLOCK_READ) {
           apr_socket_timeout_get(p, &timeout);
  -        apr_socket_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_socket_timeout_set(p, 0);
  +        }
       }
   
       *str = NULL;
  
  
  

Mime
View raw message