From 515c1d42eec8d7c0a5eabeb72b274f5446012945 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 21 Sep 2002 08:53:05 +0000 Subject: Merge back Richard's FreeBSD sendfile fixes. Jeremy. (This used to be commit f4845b0213aec58e0f489eba5653aa7b3855610f) --- source3/lib/sendfile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/lib') 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; -- cgit