make BSD sendfile actually work

master
leitner 21 years ago
parent 4210cc3556
commit 6622288c7c

@ -57,9 +57,10 @@ int64 iob_send(int64 s,io_batch* b) {
if (r==0) if (r==0)
sent=b->bytesleft; sent=b->bytesleft;
else if (r==-1 && errno==EAGAIN) { else if (r==-1 && errno==EAGAIN) {
if ((sent=sbytes)) sent=-1; if (!(sent=sbytes)) {
sent=sbytes; sent=-1;
goto eagain; goto eagain;
}
} else } else
sent=-3; sent=-3;
} else { } else {

Loading…
Cancel
Save