summaryrefslogtreecommitdiffstats
path: root/source/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
commitf4845b0213aec58e0f489eba5653aa7b3855610f (patch)
treef7f9915b48aba07e1d6ade6826cff56f041f7229 /source/lib
parentf1058012b9662f0f9ce62ea05833e78a411f80b9 (diff)
downloadsamba-f4845b0213aec58e0f489eba5653aa7b3855610f.tar.gz
samba-f4845b0213aec58e0f489eba5653aa7b3855610f.tar.xz
samba-f4845b0213aec58e0f489eba5653aa7b3855610f.zip
Merge back Richard's FreeBSD sendfile fixes.
Jeremy.
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/sendfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/lib/sendfile.c b/source/lib/sendfile.c
index df6c1980d06..98a52608b8d 100644
--- a/source/lib/sendfile.c
+++ b/source/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;