]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - recv.c
Rename buffer tree node field of struct receiver_node.
[paraslash.git] / recv.c
diff --git a/recv.c b/recv.c
index fc34279a3820869633994a2de2cc7390982e05ad..1bb0532a9f51622e645bd69074b19504be9068f6 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -6,8 +6,10 @@
 
 /** \file recv.c the stand-alone audio stream receiver */
 
+#include <regex.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <stdbool.h>
 
 #include "para.h"
 #include "list.h"
 #include "string.h"
 #include "error.h"
 #include "stdout.h"
+#include "buffer_tree.h"
 
-/** the gengetopt args info struct */
-struct recv_args_info conf;
+/** The gengetopt args info struct. */
+static struct recv_args_info conf;
 
 static int loglevel;
 /** Always log to stderr. */
@@ -89,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;
@@ -107,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)