apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r651652 - /apr/apr/branches/1.3.x/network_io/unix/sendrecv.c
Date Fri, 25 Apr 2008 17:04:27 GMT
Author: wrowe
Date: Fri Apr 25 10:04:26 2008
New Revision: 651652

URL: http://svn.apache.org/viewvc?rev=651652&view=rev
Log:
Correct legacy crumbs from the new OS/X sendfile changes.

Submitted by: Geoff Greer <angryparsley mipsisrisc.com>
Backports: r651651


Modified:
    apr/apr/branches/1.3.x/network_io/unix/sendrecv.c

Modified: apr/apr/branches/1.3.x/network_io/unix/sendrecv.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/network_io/unix/sendrecv.c?rev=651652&r1=651651&r2=651652&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/network_io/unix/sendrecv.c (original)
+++ apr/apr/branches/1.3.x/network_io/unix/sendrecv.c Fri Apr 25 10:04:26 2008
@@ -410,7 +410,7 @@
                                  apr_hdtr_t * hdtr, apr_off_t * offset,
                                  apr_size_t * len, apr_int32_t flags)
 {
-    apr_off_t nbytes = *len;
+    apr_off_t nbytes = 0;
     apr_off_t bytes_to_send = *len;
     apr_size_t header_bytes_written = 0;
     int rv;
@@ -445,9 +445,6 @@
                 header_bytes_written = rv;
                 rv = 0;
             }
-            else {
-                header_bytes_written = 0;
-            }
         }
         else if (bytes_to_send) {
             /* We won't dare call sendfile() if we don't have
@@ -513,7 +510,7 @@
         }
     } while (rv == -1 && (errno == EINTR || errno == EAGAIN));
 
-    (*len) = nbytes;
+    (*len) = nbytes + header_bytes_written;
     if (rv == -1) {
         return errno;
     }



Mime
View raw message