diff options
author | Jeremy Allison <jra@samba.org> | 2002-10-01 05:55:25 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-10-01 05:55:25 +0000 |
commit | a9ccc38c082c3c74050cbbf554cbef027e585fdd (patch) | |
tree | bd66cd06900570569a930bd81ab39cd69461f001 /source3/lib | |
parent | 3e2a384e765c0702fb34d2f2447bf653dabde185 (diff) | |
download | samba-a9ccc38c082c3c74050cbbf554cbef027e585fdd.tar.gz samba-a9ccc38c082c3c74050cbbf554cbef027e585fdd.tar.bz2 samba-a9ccc38c082c3c74050cbbf554cbef027e585fdd.zip |
Fix Solaris sendfile detection. Add small fixes to sendfile code.
Jeremy.
(This used to be commit ef7bcaf1b7e1ca073b27a8836c6aa86e112b5bee)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/sendfile.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c index d2ecf3f94a..ccebd25cc1 100644 --- a/source3/lib/sendfile.c +++ b/source3/lib/sendfile.c @@ -144,7 +144,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of #elif defined(SOLARIS_SENDFILE_API) /* - * Solaris sendfile code written by Pierre Belanger <belanger@yahoo.com>. + * Solaris sendfile code written by Pierre Belanger <belanger@pobox.com>. */ #include <sys/sendfile.h> @@ -162,14 +162,13 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of vec[0].sfv_fd = SFV_FD_SELF; vec[0].sfv_flag = 0; vec[0].sfv_off = header->data; - vec[0].sfv_len = header->length; + vec[0].sfv_len = hdr_len = header->length; vec[1].sfv_fd = fromfd; vec[1].sfv_flag = 0; vec[1].sfv_off = offset; vec[1].sfv_len = count; - hdr_len = header->length; } else { sfvcnt = 1; |