From 6622288c7c53ae329dc2f47370248f6cd3730818 Mon Sep 17 00:00:00 2001 From: leitner Date: Fri, 7 Nov 2003 00:27:50 +0000 Subject: [PATCH] make BSD sendfile actually work --- io/iob_send.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/io/iob_send.c b/io/iob_send.c index 6283e59..66b10eb 100644 --- a/io/iob_send.c +++ b/io/iob_send.c @@ -57,9 +57,10 @@ int64 iob_send(int64 s,io_batch* b) { if (r==0) sent=b->bytesleft; else if (r==-1 && errno==EAGAIN) { - if ((sent=sbytes)) sent=-1; - sent=sbytes; - goto eagain; + if (!(sent=sbytes)) { + sent=-1; + goto eagain; + } } else sent=-3; } else {