Build problem when no audiod.conf exists
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sat, 24 Jan 2009 22:37:04 +0000 (23:37 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 26 Jan 2009 13:11:04 +0000 (14:11 +0100)
This avoids stopping the build process and allows users to read
the detailed help before getting the error message about a missing
audiod.conf file - fixed by parsing after testing for the help text.

audiod.c

index a92c4e3..60d2612 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -1127,9 +1127,9 @@ int main(int argc, char *argv[])
        audiod_cmdline_parser_ext(argc, argv, &conf, &params);
        HANDLE_VERSION_FLAG("audiod", conf);
        drop_privileges_or_die(conf.user_arg, conf.group_arg);
-       parse_config_or_die();
        if (conf.help_given || conf.detailed_help_given)
                print_help_and_die();
+       parse_config_or_die();
        daemon_set_flag(DF_LOG_TIME);
        daemon_set_flag(DF_LOG_HOSTNAME);
        daemon_set_flag(DF_LOG_LL);