]> arthur.barton.de Git - netatalk.git/commitdiff
rbuflen initialisation was still wrong
authorFrank Lahm <franklahm@googlemail.com>
Sun, 20 Nov 2011 12:23:24 +0000 (13:23 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Sun, 20 Nov 2011 12:23:24 +0000 (13:23 +0100)
etc/afpd/fork.c

index aff46d5337c31a55aca705e0329d1e31dc768239..0c4956b82c8a85684f703631b4f4f3e8f1e3ce37 100644 (file)
@@ -900,8 +900,10 @@ static int read_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, si
         goto afp_read_err;
     }
 
+#ifdef WITH_SENDFILE
+    *rbuflen = 0;
+#else
     *rbuflen = MIN(reqcount, *rbuflen);
-#ifndef WITH_SENDFILE
     err = read_file(ofork, eid, offset, nlmask, nlchar, rbuf, rbuflen, xlate);
     if (err < 0)
         goto afp_read_done;