buffer_tree: Add code to splice out a node of the buffer tree.
[paraslash.git] / write.c
diff --git a/write.c b/write.c
index 21a0dad..818175a 100644 (file)
--- a/write.c
+++ b/write.c
@@ -190,20 +190,21 @@ static int main_btr(struct sched *s)
        struct writer *w = writers + DEFAULT_WRITER;
        int ret;
 
-       wn->writer_num = DEFAULT_WRITER;
-       wn->conf = writers[DEFAULT_WRITER].parse_config("-B");
        sit.btrn = btr_new_node("stdin", NULL /* stdin has no parent */, NULL);
        stdin_set_defaults(&sit);
        register_task(&sit.task);
 
+       wn->writer_num = DEFAULT_WRITER;
+       wn->conf = writers[DEFAULT_WRITER].parse_config("-B");
        wn->btrn = btr_new_node("writer", sit.btrn, NULL);
-
        sprintf(wn->task.status, "some writer");
        w->open(wn);
        wn->task.post_select = w->post_select_btr;
        wn->task.pre_select = w->pre_select_btr;
        register_task(&wn->task);
 
+
+
        s->default_timeout.tv_sec = 10;
        s->default_timeout.tv_usec = 50000;
        ret = schedule(s);