Avoid unwanted log messages during startup.
[paraslash.git] / audioc.c
index 3cbd8a82f2d3a52248be600182daf76ecc768d03..6a8867182e42bb1a7d6041d4ae0e55fbcba1164d 100644 (file)
--- 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, &params);
+               audioc_cmdline_parser_config_file(cf, &conf, &params);
                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 {