Call get_config() only once, not twice
authorArt Cancro <ajc@uncensored.citadel.org>
Fri, 10 Apr 2015 17:48:23 +0000 (13:48 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Fri, 10 Apr 2015 17:48:23 +0000 (13:48 -0400)
citadel/citserver.c
citadel/config.c
citadel/server_main.c

index 4a1070b23563876a03ca5b84c10951497888665f..765556cafbf3e4de3de1a03924b2b1d25a99b3db 100644 (file)
@@ -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) {
index 34028abb0ee36b511a9fdcd7cbb9565b8f68ab37..3a4e088f8b50f30b6fc347e93b4fe98920e26b8a 100644 (file)
@@ -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) {
index 6a7d293fb8ef7cf6265fa3b4e4d044b1d117a339..691096b66a05cc4371b80aa0394d7ae199a155e6 100644 (file)
@@ -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");