summaryrefslogtreecommitdiffhomepage
path: root/src/main.c
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2020-01-15 16:57:00 +0000
committerrofl0r <rofl0r@users.noreply.github.com>2020-01-15 16:57:03 +0000
commit5dd514af93675602cdece2b7b2112989b87d5d51 (patch)
tree3f175638fa5c62364627df97aa8a1035c0fa8154 /src/main.c
parent27d96df99900c5a62ab0fdf2a37565e78f256d6a (diff)
conf: fix loading of default values
previously, default values were stored once into a static struct, then on each reload item by item copied manually into a "new" config struct. this has proven to be errorprone, as additions in one of the 2 locations were not propagated to the second one, apart from being simply a lot of gratuitous code. we now simply load the default values directly into the config struct to be used on each reload. closes #283
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 71b6f91..8a3b6fa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -250,8 +250,7 @@ int reload_config (int reload_logging)
if (reload_logging) shutdown_logging ();
- ret = reload_config_file (config_file, &config_main,
- &config_defaults);
+ ret = reload_config_file (config_file, &config_main);
if (ret != 0) {
goto done;
@@ -309,8 +308,6 @@ main (int argc, char **argv)
}
}
- initialize_config_defaults (&config_defaults);
-
if (reload_config(0)) {
exit (EX_SOFTWARE);
}