X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=recv.c;h=9d6f028319fc6e1e8f36f7406fc64475fb3576df;hp=4f595e39aae21cbef207fc1418c5973d0fbd68a1;hb=16758aa8a898d222ef417d408916f1dc11b12650;hpb=56955f95584f51709320262f7d2e0ea79301d346 diff --git a/recv.c b/recv.c index 4f595e39..9d6f0283 100644 --- a/recv.c +++ b/recv.c @@ -6,6 +6,7 @@ /** \file recv.c the stand-alone audio stream receiver */ +#include #include #include @@ -20,8 +21,8 @@ #include "error.h" #include "stdout.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. */ @@ -52,6 +53,7 @@ static void *parse_config(int argc, char *argv[], int *receiver_num) HANDLE_VERSION_FLAG("recv", conf); if (conf.help_given || conf.detailed_help_given) print_help_and_die(); + loglevel = get_loglevel_by_name(conf.loglevel_arg); return check_receiver_arg(conf.receiver_arg, receiver_num); } @@ -86,7 +88,6 @@ int main(int argc, char *argv[]) PARA_EMERG_LOG("parse failed\n"); goto out; } - loglevel = get_loglevel_by_name(conf.loglevel_arg); r = &receivers[receiver_num]; rn.receiver = r; ret = r->open(&rn); @@ -95,7 +96,7 @@ int main(int argc, char *argv[]) r_opened = 1; stdout_set_defaults(&sot); - sot.buf = rn.buf; + sot.bufp = &rn.buf; sot.loaded = &rn.loaded; sot.input_error = &rn.task.error; register_task(&sot.task);