FreeBSD Bugzilla – Attachment 123949 Details for
Bug 167380
updated net/netatalk 2.2.2 breaks file transfers due to incorrect use of sendfile
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 1.37 KB, created by
Daniel Becker
on 2012-04-27 23:10:10 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Daniel Becker
Created:
2012-04-27 23:10:10 UTC
Size:
1.37 KB
patch
obsolete
>From d24a954821229e8835acb6d629ef1f09a4441e8b Mon Sep 17 00:00:00 2001 >From: Frank Lahm <franklahm@googlemail.com> >Date: Thu, 9 Feb 2012 15:39:08 +0100 >Subject: [PATCH] Fix broken sendfile on FreeBSD, from Denis Ahrens > >--- > NEWS | 1 + > libatalk/adouble/ad_sendfile.c | 11 ++++++++++- > 2 files changed, 11 insertions(+), 1 deletions(-) > >diff --git a/NEWS b/NEWS >index 2ad321a..88d44f7 100644 >--- a/NEWS >+++ b/NEWS >@@ -4,6 +4,7 @@ Changes in 2.2.3 > * UPD: based on Unicode 6.1.0 > * UPD: experimental systemd service files: always run both afpd and cnid_metad > * UPD: afpd: Ensure our umask is not altered by eg pam_umask >+* FIX: afpd: sendfile() on FreeBSD was broken, courtesy of Denis Ahrens > > Changes in 2.2.2 > ================ >diff --git a/libatalk/adouble/ad_sendfile.c b/libatalk/adouble/ad_sendfile.c >index aabb61c..0e7b278 100644 >--- a/libatalk/adouble/ad_sendfile.c >+++ b/libatalk/adouble/ad_sendfile.c >@@ -67,7 +67,16 @@ ssize_t sys_sendfile(int tofd, int fromfd, off_t *offset, size_t count) > #include <sys/uio.h> > ssize_t sys_sendfile(int tofd, int fromfd, off_t *offset, size_t count) > { >- return sendfile(fromfd, tofd, *offset, count, NULL, offset, 0); >+ off_t len; >+ int ret; >+ >+ ret = sendfile(fromfd, tofd, *offset, count, NULL, &len, 0); >+ >+ *offset += len; >+ >+ if (ret != 0) >+ return -1; >+ return len; > } > > #else >-- >1.7.4.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 167380
: 123949