diff options
author | Jeremy Allison <jra@samba.org> | 2002-10-01 05:54:40 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-10-01 05:54:40 +0000 |
commit | 88e481ec13505f7e870a2172db3d4edf5ce47caf (patch) | |
tree | 53182ad8b674dbe40d08527dd59379fff89d1ab5 /source3/lib | |
parent | 88fad685d4c0e123ab0f85d8b081ae770569218e (diff) | |
download | samba-88e481ec13505f7e870a2172db3d4edf5ce47caf.tar.gz samba-88e481ec13505f7e870a2172db3d4edf5ce47caf.tar.bz2 samba-88e481ec13505f7e870a2172db3d4edf5ce47caf.zip |
Fix Solaris sendfile detection. Add small fixes to sendfile code.
Jeremy.
(This used to be commit 7ba5636897ea57669c62d22bb399bcfe5e3a9907)
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; |