]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - http_recv.c
sched: Update "now" also after post_select.
[paraslash.git] / http_recv.c
index 20e00033abf01ae7013e59117f1a10bafa592f05..b3b621035f026c0591e6044a7e39ac55893bef4a 100644 (file)
@@ -89,7 +89,13 @@ static void http_recv_pre_select(struct sched *s, struct task *t)
 {
        struct receiver_node *rn = container_of(t, struct receiver_node, task);
        struct private_http_recv_data *phd = rn->private_data;
+       int ret;
 
+       if (rn->btrn) {
+               ret = generic_recv_pre_select(s, t);
+               if (ret <= 0)
+                       return;
+       }
        t->error = 0;
        if  (phd->status == HTTP_CONNECTED)
                para_fd_set(phd->fd, &s->wfds, &s->max_fileno);
@@ -180,6 +186,7 @@ static void http_recv_close(struct receiver_node *rn)
        close(phd->fd);
        free(rn->buf);
        free(rn->private_data);
+       http_recv_cmdline_parser_free(rn->conf);
 }
 
 static void *http_recv_parse_config(int argc, char **argv)
@@ -211,8 +218,6 @@ static int http_recv_open(struct receiver_node *rn)
        rn->private_data = phd = para_calloc(sizeof(struct private_http_recv_data));
        phd->fd = fd;
        phd->status = HTTP_CONNECTED;
-       if (conf->buffer_tree_given)
-               rn->btrn = btr_new_node("receiver", NULL, NULL, NULL);
        return 1;
 }