X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audioc.c;h=6a8867182e42bb1a7d6041d4ae0e55fbcba1164d;hp=3cbd8a82f2d3a52248be600182daf76ecc768d03;hb=b01605d7062e4d1f005d5aaaaed158d8efe06d79;hpb=88b0ec645a25f8f1a0856bb092fa169d7b0c5f6a diff --git a/audioc.c b/audioc.c index 3cbd8a82..6a886718 100644 --- a/audioc.c +++ b/audioc.c @@ -137,8 +137,7 @@ out: static struct audioc_task audioc_task = { .task = { .pre_select = audioc_pre_select, - .new_post_select = audioc_post_select, - .post_select = NULL, + .post_select = audioc_post_select, .status = "audioc task" }, }, *at = &audioc_task; @@ -282,29 +281,27 @@ static char *configfile_exists(void) */ int main(int argc, char *argv[]) { - int ret = -E_AUDIOC_SYNTAX, fd; + int ret, fd; char *cf, *buf = NULL, *args = NULL; size_t bufsize; - if (audioc_cmdline_parser(argc, argv, &conf)) - goto out; + audioc_cmdline_parser(argc, argv, &conf); HANDLE_VERSION_FLAG("audioc", conf); + loglevel = get_loglevel_by_name(conf.loglevel_arg); cf = configfile_exists(); if (cf) { struct audioc_cmdline_parser_params params = { .override = 0, .initialize = 0, .check_required = 0, - .check_ambiguity = 0 + .check_ambiguity = 0, + .print_errors = 1, + }; - ret = audioc_cmdline_parser_config_file(cf, &conf, ¶ms); + audioc_cmdline_parser_config_file(cf, &conf, ¶ms); free(cf); - if (ret) { - fprintf(stderr, "parse error in config file\n"); - exit(EXIT_FAILURE); - } + loglevel = get_loglevel_by_name(conf.loglevel_arg); } - loglevel = get_loglevel_by_name(conf.loglevel_arg); if (conf.socket_given) socket_name = para_strdup(conf.socket_arg); else {