summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-09-21 08:53:05 +0000
committerJeremy Allison <jra@samba.org>2002-09-21 08:53:05 +0000
commit515c1d42eec8d7c0a5eabeb72b274f5446012945 (patch)
tree771a86c5a0c106aea08c233237e979c847d04892 /source3/lib
parentc48bfd8ce840f81e00a2373ee19668208a62a404 (diff)
downloadsamba-515c1d42eec8d7c0a5eabeb72b274f5446012945.tar.gz
samba-515c1d42eec8d7c0a5eabeb72b274f5446012945.tar.bz2
samba-515c1d42eec8d7c0a5eabeb72b274f5446012945.zip
Merge back Richard's FreeBSD sendfile fixes.
Jeremy. (This used to be commit f4845b0213aec58e0f489eba5653aa7b3855610f)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/sendfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c
index df6c1980d0..98a52608b8 100644
--- a/source3/lib/sendfile.c
+++ b/source3/lib/sendfile.c
@@ -233,10 +233,10 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
struct iovec hdtrl;
size_t hdr_len = 0;
- hdr->headers = &hdtrl;
- hdr->hdr_cnt = 1;
- hdr->trailers = NULL;
- hdr->trl_cnt = 0;
+ hdr.headers = &hdtrl;
+ hdr.hdr_cnt = 1;
+ hdr.trailers = NULL;
+ hdr.trl_cnt = 0;
/* Set up the header iovec. */
if (header) {
@@ -274,7 +274,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
* We change nwritten to be the number of file bytes written.
*/
- if (hdtrl[0].iov_base && hdtrl.iov_len) {
+ if (hdtrl.iov_base && hdtrl.iov_len) {
if (nwritten >= hdtrl.iov_len) {
nwritten -= hdtrl.iov_len;
hdtrl.iov_base = NULL;