From 8f37f8f531f7c6c908ea35b77e633838c646c6e4 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 10 Apr 2015 13:48:23 -0400 Subject: [PATCH] Call get_config() only once, not twice --- citadel/citserver.c | 2 -- citadel/config.c | 6 ++++-- citadel/server_main.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/citadel/citserver.c b/citadel/citserver.c index 4a1070b23..765556caf 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -122,8 +122,6 @@ void master_startup(void) { syslog(LOG_DEBUG, "master_startup() started\n"); time(&server_startup_time); - get_config(); - validate_config(); syslog(LOG_INFO, "Checking directory access"); if ((pw = getpwuid(CTDLUID)) == NULL) { diff --git a/citadel/config.c b/citadel/config.c index 34028abb0..3a4e088f8 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -1,7 +1,7 @@ /* * Read and write the citadel.config file * - * Copyright (c) 1987-2014 by the citadel.org team + * Copyright (c) 1987-2015 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -167,8 +167,10 @@ void setcfglen(void) configlen.c_pager_program = strlen(config.c_pager_program); } + + /* - * get_config() is called during the initialization of Citadel server. + * Called during the initialization of Citadel server. * It verifies the system's integrity and reads citadel.config into memory. */ void get_config(void) { diff --git a/citadel/server_main.c b/citadel/server_main.c index 6a7d293fb..691096b66 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -164,6 +164,7 @@ int main(int argc, char **argv) /* Load site-specific configuration */ syslog(LOG_INFO, "Loading citadel.config"); get_config(); + validate_config(); /* get_control() MUST MUST MUST be called BEFORE the databases are opened!! */ syslog(LOG_INFO, "Acquiring control record"); -- 2.30.2