summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/main.c b/src/main.c
index 3427fc9..abf52f9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);