X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=recv.c;h=c8edb5936e231d493c4f801456eeecb6a2a0da7a;hb=aa234b7afe223879a7bd7274ce05a3a315a2ec49;hp=fc34279a3820869633994a2de2cc7390982e05ad;hpb=b7f19d039c4aa46faa4e9b8e889520fd72df272a;p=paraslash.git diff --git a/recv.c b/recv.c index fc34279a..c8edb593 100644 --- a/recv.c +++ b/recv.c @@ -6,8 +6,10 @@ /** \file recv.c the stand-alone audio stream receiver */ +#include #include #include +#include #include "para.h" #include "list.h" @@ -19,9 +21,10 @@ #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. */ @@ -94,6 +97,9 @@ int main(int argc, char *argv[]) goto out; r_opened = 1; + if (conf.buffer_tree_given) + sot.btrn = btr_new_node("stdout", rn.btrn, NULL, NULL); + stdout_set_defaults(&sot); sot.bufp = &rn.buf; sot.loaded = &rn.loaded; @@ -107,6 +113,8 @@ int main(int argc, char *argv[]) ret = schedule(&s); out: + if (conf.buffer_tree_given) + btr_free_node(sot.btrn); if (r_opened) r->close(&rn); if (r)