We must not fall back to the old way (read-write)
if sendfile() transferred some data before throwing a error condition because sendfile() won't move the file offset for read() to start from. MFC after: 2 weeks
This commit is contained in:
parent
fedc64eac9
commit
9a27d52ecc
@ -2058,7 +2058,7 @@ send_data(FILE *instr, FILE *outstr, off_t blksize, off_t filesize, int isreg)
|
||||
filesize -= cnt;
|
||||
|
||||
if (err == -1) {
|
||||
if (!cnt)
|
||||
if (cnt == 0 && offset == 0)
|
||||
goto oldway;
|
||||
|
||||
goto data_err;
|
||||
|
Loading…
Reference in New Issue
Block a user