summaryrefslogtreecommitdiffstats
path: root/src/cfg.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2020-10-07 11:10:36 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-10-07 11:17:00 +0200
commitfe1ce97c50e575201fe47d7587251e228edf8fdf (patch)
tree4656eeb2fe23e2ef1a148af1303cae329c449078 /src/cfg.h
parent3cea4bb763165d119a329a1c7f2c767857cdb384 (diff)
#988 remove legacy configuration
Use og_server_cfg everywhere. Convert port to string to make it easy for the dbi API since it expects a string. Remove legacy example configuration file.
Diffstat (limited to 'src/cfg.h')
-rw-r--r--src/cfg.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/cfg.h b/src/cfg.h
index 75678da..97e47cf 100644
--- a/src/cfg.h
+++ b/src/cfg.h
@@ -1,14 +1,11 @@
#ifndef _OG_SERVER_CFG_H
#define _OG_SERVER_CFG_H
+#include <jansson.h>
+#include "dbi.h"
+
struct og_server_cfg {
- struct {
- const char *user;
- const char *pass;
- const char *ip;
- unsigned int port;
- const char *name;
- } db;
+ struct og_dbi_config db;
struct {
const char *ip;
const char *port;
@@ -24,7 +21,6 @@ struct og_server_cfg {
};
int parse_json_config(const char *filename, struct og_server_cfg *cfg);
-void from_json_to_legacy(struct og_server_cfg *cfg);
extern struct og_server_cfg ogconfig;