X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=http_recv.c;h=264ae2c299c389ed59d1ee7b85424753b799fe7e;hp=b566acf3c0612a48d5796ca01dae5359bb93386e;hb=63ea5c449c9d944ffcfea2bba906ef42679fa996;hpb=899a19c03fc05f6fd98687e3eaa86841a4633a10;ds=sidebyside diff --git a/http_recv.c b/http_recv.c index b566acf3..264ae2c2 100644 --- a/http_recv.c +++ b/http_recv.c @@ -110,6 +110,11 @@ static void http_recv_post_select(struct sched *s, struct task *t) struct receiver_node *rn = t->private_data; struct private_http_recv_data *phd = rn->private_data; + t->ret = -E_HTTP_RECV_EOF; + if (rn->output_eof && *rn->output_eof) { + rn->eof = 1; + return; + } t->ret = 1; if (!s->select_ret) /* we're not interested in timeouts */ return; @@ -137,8 +142,10 @@ static void http_recv_post_select(struct sched *s, struct task *t) } t->ret = -E_OVERRUN; /* already streaming */ - if (rn->loaded >= BUFSIZE) + if (rn->loaded >= BUFSIZE) { + rn->eof = 1; return; + } t->ret = recv_bin_buffer(phd->fd, rn->buf + rn->loaded, BUFSIZE - rn->loaded); if (t->ret <= 0) {