summaryrefslogtreecommitdiffstats
path: root/src/client.c
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/client.c
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/client.c')
-rw-r--r--src/client.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client.c b/src/client.c
index b475189..ebac662 100644
--- a/src/client.c
+++ b/src/client.c
@@ -7,6 +7,7 @@
*/
#include "ogAdmServer.h"
+#include "cfg.h"
#include "dbi.h"
#include "utils.h"
#include "list.h"
@@ -129,7 +130,7 @@ static int og_resp_hardware(json_t *data, struct og_client *cli)
return -1;
}
- dbi = og_dbi_open(&dbi_config);
+ dbi = og_dbi_open(&ogconfig.db);
if (!dbi) {
syslog(LOG_ERR, "cannot open connection database (%s:%d)\n",
__func__, __LINE__);
@@ -197,7 +198,7 @@ static int og_resp_software(json_t *data, struct og_client *cli)
return -1;
}
- dbi = og_dbi_open(&dbi_config);
+ dbi = og_dbi_open(&ogconfig.db);
if (!dbi) {
syslog(LOG_ERR, "cannot open connection database (%s:%d)\n",
__func__, __LINE__);
@@ -265,7 +266,7 @@ static int og_dbi_queue_autorun(uint32_t computer_id, uint32_t proc_id)
};
struct og_dbi *dbi;
- dbi = og_dbi_open(&dbi_config);
+ dbi = og_dbi_open(&ogconfig.db);
if (!dbi) {
syslog(LOG_ERR, "cannot open connection database "
"(%s:%d)\n", __func__, __LINE__);
@@ -343,7 +344,7 @@ static int og_resp_refresh(json_t *data, struct og_client *cli)
partitions[i].used_size);
}
- dbi = og_dbi_open(&dbi_config);
+ dbi = og_dbi_open(&ogconfig.db);
if (!dbi) {
syslog(LOG_ERR, "cannot open connection database (%s:%d)\n",
__func__, __LINE__);
@@ -460,7 +461,7 @@ static int og_resp_image_create(json_t *data, struct og_client *cli)
return -1;
}
- dbi = og_dbi_open(&dbi_config);
+ dbi = og_dbi_open(&ogconfig.db);
if (!dbi) {
syslog(LOG_ERR, "cannot open connection database (%s:%d)\n",
__func__, __LINE__);
@@ -560,7 +561,7 @@ static int og_resp_image_restore(json_t *data, struct og_client *cli)
return -1;
}
- dbi = og_dbi_open(&dbi_config);
+ dbi = og_dbi_open(&ogconfig.db);
if (!dbi) {
syslog(LOG_ERR, "cannot open connection database (%s:%d)\n",
__func__, __LINE__);