]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - http_recv.c
para_write: Make check for wav header work with btr.
[paraslash.git] / http_recv.c
index abb8c1e8ed1686c2b9285e3e6346565522a41452..cf93076d0c9bcea5705d624b980f6a8eda5a1f41 100644 (file)
@@ -136,6 +136,10 @@ static void http_recv_post_select(struct sched *s, struct task *t)
        if (conf->buffer_tree_given) {
                char *buf;
 
+               if (btr_no_children(rn->btrn)) {
+                       t->error = -E_HTTP_RECV_NO_CHILD;
+                       goto err;
+               }
                if (btr_bytes_pending(rn->btrn) > HTTP_RECV_MAX_PENDING) {
                        t->error = -E_HTTP_RECV_OVERRUN;
                        goto err;
@@ -211,7 +215,7 @@ static int http_recv_open(struct receiver_node *rn)
        phd->fd = fd;
        phd->status = HTTP_CONNECTED;
        if (conf->buffer_tree_given)
-               rn->btrn = btr_new_node("receiver", NULL);
+               rn->btrn = btr_new_node("receiver", NULL, NULL, NULL);
        return 1;
 }