summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2020-10-07 11:05:51 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-10-07 11:11:04 +0200
commit3cea4bb763165d119a329a1c7f2c767857cdb384 (patch)
treed4a4b18025967ef5bacf7cbd7808698ad63ed7e6 /src/main.c
parentd7a871b529de5f7d1a72137f395e3ae8bb42a1fd (diff)
#988 rename og_server_cfg to cfg
to avoid clash with existing variable cfg in client.c
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 9fe13ad..8ca7283 100644
--- a/src/main.c
+++ b/src/main.c
@@ -27,7 +27,7 @@ static struct option og_server_opts[] = {
#define OG_SERVER_CFG_JSON "/opt/opengnsys/cfg/ogserver.json"
#define OG_SERVER_REPO_PATH "/opt/opengnsys/images"
-struct og_server_cfg cfg = {
+struct og_server_cfg ogconfig = {
.repo = {
.dir = OG_SERVER_REPO_PATH,
},
@@ -66,12 +66,12 @@ int main(int argc, char *argv[])
}
}
- if (parse_json_config(config_file, &cfg) < 0)
+ if (parse_json_config(config_file, &ogconfig) < 0)
return EXIT_FAILURE;
- from_json_to_legacy(&cfg);
+ from_json_to_legacy(&ogconfig);
- socket_rest = og_socket_server_init(cfg.rest.port);
+ socket_rest = og_socket_server_init(ogconfig.rest.port);
if (socket_rest < 0) {
syslog(LOG_ERR, "Cannot open REST API server socket\n");
exit(EXIT_FAILURE);