recv: Use buffer tree API unconditionally.
authorAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 01:22:55 +0000 (02:22 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 01:22:55 +0000 (02:22 +0100)
This allows to kill the -B option.

ggo/recv.m4
recv.c

index ce0aa62aea8f7791716313232f2bdc0a77fd3f20..9702e12b466dada94e78eb524657e74c46c9f5f5 100644 (file)
@@ -1,6 +1,5 @@
 include(header.m4)
 include(loglevel.m4)
-include(buffer_tree.m4)
 
 <qu>
 option "receiver" r
diff --git a/recv.c b/recv.c
index 803965c078078491bbfecdb3eb73209442dc167d..70866a35bb7c96a9157570a140b03eddc9043845 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -92,16 +92,13 @@ int main(int argc, char *argv[])
        }
        r = &receivers[receiver_num];
        rn.receiver = r;
-       if (conf.buffer_tree_given)
-               rn.btrn = btr_new_node("receiver", NULL, NULL, NULL);
+       rn.btrn = btr_new_node("receiver", NULL, NULL, NULL);
        ret = r->open(&rn);
        if (ret < 0)
                goto out;
        r_opened = 1;
 
-       if (conf.buffer_tree_given)
-               sot.btrn = btr_new_node("stdout", rn.btrn, NULL, NULL);
-
+       sot.btrn = btr_new_node("stdout", rn.btrn, NULL, NULL);
        stdout_set_defaults(&sot);
        sot.bufp = &rn.buf;
        sot.loaded = &rn.loaded;
@@ -117,10 +114,8 @@ int main(int argc, char *argv[])
 out:
        if (r_opened)
                r->close(&rn);
-       if (conf.buffer_tree_given) {
-               btr_free_node(rn.btrn);
-               btr_free_node(sot.btrn);
-       }
+       btr_free_node(rn.btrn);
+       btr_free_node(sot.btrn);
        free(rn.conf);
        if (ret < 0)
                PARA_ERROR_LOG("%s\n", para_strerror(-ret));