]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - buffer_tree.c
para_write: Make loglevel work again.
[paraslash.git] / buffer_tree.c
index 3b00154183d9c19ba0e4895c6fcdec2e03010a96..022a4118a76d0191d197b5cda6bc64b77eff924c 100644 (file)
@@ -216,20 +216,26 @@ static void flush_input_queue(struct btr_node *btrn)
                btr_drop_buffer_reference(br);
 }
 
-void btr_del_node(struct btr_node *btrn)
+void btr_free_node(struct btr_node *btrn)
+{
+       if (!btrn)
+               return;
+       free(btrn->name);
+       free(btrn);
+}
+
+void btr_remove_node(struct btr_node *btrn)
 {
        struct btr_node *ch;
 
        if (!btrn)
                return;
-       PARA_NOTICE_LOG("deleting %s\n", btrn->name);
+       PARA_NOTICE_LOG("removing btr node %s from buffer tree\n", btrn->name);
        FOR_EACH_CHILD(ch, btrn)
                ch->parent = NULL;
        flush_input_queue(btrn);
        if (btrn->parent)
                list_del(&btrn->node);
-       free(btrn->name);
-       free(btrn);
 }
 
 size_t btr_get_input_queue_size(struct btr_node *btrn)
@@ -261,8 +267,6 @@ void btr_splice_out_node(struct btr_node *btrn)
                        list_move(&ch->node, &btrn->parent->children);
        }
        assert(list_empty(&btrn->children));
-       free(btrn->name);
-       free(btrn);
 }
 
 /**