apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr/network_io/unix sendrecv.c
Date Tue, 02 Jan 2001 01:12:17 GMT
rbb         01/01/01 17:12:17

  Modified:    network_io/unix sendrecv.c
  Log:
  It is possible that we will not write everything from the headers in the
  first attempt when using Sendfile.  It doesn't matter if we have a timeout
  or not, if we write some data, but not all, we have to return from
  apr_sendfile, and let the application figure out how to proceed.
  
  Revision  Changes    Path
  1.54      +8 -10     apr/network_io/unix/sendrecv.c
  
  Index: sendrecv.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sendrecv.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- sendrecv.c	2000/12/28 23:03:28	1.53
  +++ sendrecv.c	2001/01/02 01:12:17	1.54
  @@ -267,7 +267,7 @@
   
       if (hdtr->numheaders > 0) {
           apr_int32_t hdrbytes;
  -        
  +
           /* cork before writing headers */
           rv = os_cork(sock);
           if (rv < 0) {
  @@ -288,15 +288,13 @@
            * return now with the partial byte count; this is a non-blocking 
            * socket.
            */
  -        if (sock->timeout <= 0) {
  -            total_hdrbytes = 0;
  -            for (i = 0; i < hdtr->numheaders; i++) {
  -                total_hdrbytes += hdtr->headers[i].iov_len;
  -            }
  -            if (hdrbytes < total_hdrbytes) {
  -                *len = hdrbytes;
  -                return os_uncork(sock, delayflag);
  -            }
  +        total_hdrbytes = 0;
  +        for (i = 0; i < hdtr->numheaders; i++) {
  +            total_hdrbytes += hdtr->headers[i].iov_len;
  +        }
  +        if (hdrbytes < total_hdrbytes) {
  +            *len = hdrbytes;
  +            return os_uncork(sock, delayflag);
           }
       }
   
  
  
  

Mime
View raw message