Rename buffer tree node field of struct receiver_node.
[paraslash.git] / recv.c
diff --git a/recv.c b/recv.c
index 9d6f028319fc6e1e8f36f7406fc64475fb3576df..1bb0532a9f51622e645bd69074b19504be9068f6 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -9,6 +9,7 @@
 #include <regex.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <stdbool.h>
 
 #include "para.h"
 #include "list.h"
@@ -20,6 +21,7 @@
 #include "string.h"
 #include "error.h"
 #include "stdout.h"
+#include "buffer_tree.h"
 
 /** The gengetopt args info struct. */
 static struct recv_args_info conf;
@@ -90,6 +92,7 @@ int main(int argc, char *argv[])
        }
        r = &receivers[receiver_num];
        rn.receiver = r;
+       rn.btrn = btr_new_node("receiver", NULL /* no parent */);
        ret = r->open(&rn);
        if (ret < 0)
                goto out;
@@ -108,8 +111,10 @@ int main(int argc, char *argv[])
 
        ret = schedule(&s);
 out:
-       if (r_opened)
+       if (r_opened) {
+               btr_del_node(rn.btrn);
                r->close(&rn);
+       }
        if (r)
                r->shutdown();
        if (ret < 0)