]> arthur.barton.de Git - netatalk.git/commitdiff
Revert f422a450, read_file() does to many checks to be factored out easily
authorFrank Lahm <franklahm@googlemail.com>
Thu, 24 Nov 2011 12:00:38 +0000 (13:00 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Thu, 24 Nov 2011 12:00:38 +0000 (13:00 +0100)
etc/afpd/fork.c

index f4d513779d4b0188eaa908d89cd6b8a2c2636e1b..cf6859c0b994369499e2e820150c33780750aca7 100644 (file)
@@ -900,14 +900,11 @@ 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);
     err = read_file(ofork, eid, offset, nlmask, nlchar, rbuf, rbuflen, xlate);
     if (err < 0)
         goto afp_read_done;
-#endif
+
     /* dsi can stream requests. we can only do this if we're not checking
      * for an end-of-line character. oh well. */
     if ((obj->proto == AFPPROTO_DSI) && (*rbuflen < reqcount) && !nlmask) {