diff options
Diffstat (limited to '')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -329,23 +329,11 @@ main (int argc, char **argv) log_message (LOG_INFO, "Initializing " PACKAGE " ..."); - /* Read in the settings from the config file */ - config_file = fopen (config.config_file, "r"); - if (!config_file) { - fprintf (stderr, - "%s: Could not open config file \"%s\".\n", - argv[0], config.config_file); - exit (EX_SOFTWARE); - } - - if (config_compile () || config_parse (&config, config_file)) { - fprintf (stderr, "Unable to parse config file. " - "Not starting.\n"); + ret = load_config_file(config.config_file, &config); + if (ret != 0) { exit (EX_SOFTWARE); } - fclose (config_file); - ret = setup_logging (); if (ret != 0) { exit (EX_SOFTWARE); |