Add btr support to the oggdec filter.
[paraslash.git] / http_recv.c
index abb8c1e..cf93076 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;
 }