diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sources/main.c b/sources/main.c index 3588e4c..5f6d164 100644 --- a/sources/main.c +++ b/sources/main.c @@ -18,7 +18,7 @@ #include "cfg.h" #include <syslog.h> -#define OG_SERVER_CFG_DATABASE "/opt/opengnsys/cfg/ogserver.json" +#define OG_SERVER_CFG_JSON "/opt/opengnsys/cfg/ogserver.json" int main(int argc, char *argv[]) { @@ -36,11 +36,12 @@ int main(int argc, char *argv[]) if (!validacionParametros(argc, argv, 1)) // Valida parámetros de ejecución exit(EXIT_FAILURE); - if (!tomaConfiguracion(szPathFileCfg)) { - syslog(LOG_INFO, "falling back to %s\n", OG_SERVER_CFG_DATABASE); - if (parse_json_config(OG_SERVER_CFG_DATABASE, &cfg) < 0) + if (parse_json_config(OG_SERVER_CFG_JSON, &cfg) < 0) { + syslog(LOG_INFO, "Falling back to legacy configuration file at %s\n", + szPathFileCfg); + if (!tomaConfiguracion(szPathFileCfg)) exit(EXIT_FAILURE); - + } else { from_json_to_legacy(&cfg); } |