]> arthur.barton.de Git - netatalk.git/commitdiff
Fix dsi->in_write flag/counter
authorFrank Lahm <franklahm@googlemail.com>
Wed, 30 May 2012 10:53:55 +0000 (12:53 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 30 May 2012 10:53:55 +0000 (12:53 +0200)
The new/tuned sendfile using code resulted in in_write being
decremented to -1 because dsi_readdone was called (which
decremnts it by 1) althoug it wasn't incremented before. The fix
is to not call dsi_readdone() at all in the sendfile case as
we didn't call the counterpart dsi_readinit() beforehand.

etc/afpd/fork.c

index 3bdb5cdee2e9239e6123134e9d306d92d16875f4..8f5a2e671740c36029424008ecda65b1c67d6e2b 100644 (file)
@@ -863,7 +863,6 @@ static int read_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, si
                 of_name(ofork), strerror(errno));
             goto afp_read_exit;
         }
-        dsi_readdone(dsi);
         goto afp_read_done;
     }
 #endif