[prev in list] [next in list] [prev in thread] [next in thread]
List: apr-cvs
Subject: svn commit: r651652 - /apr/apr/branches/1.3.x/network_io/unix/sendrecv.c
From: wrowe () apache ! org
Date: 2008-04-25 17:04:27
Message-ID: 20080425170428.07E1B1A9838 () eris ! apache ! org
[Download RAW message or body]
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;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic