summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
-rw-r--r--src/schema.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index c4148a5..d8453de 100644
--- a/src/main.c
+++ b/src/main.c
@@ -92,8 +92,10 @@ int main(int argc, char *argv[])
ev_io_init(&ev_io_agent_rest, og_server_accept_cb, socket_agent_rest, EV_READ);
ev_io_start(og_loop, &ev_io_agent_rest);
- if (og_dbi_schema_update() < 0)
+ if (og_dbi_schema_update() < 0) {
+ syslog(LOG_ERR, "Cannot update the database schema\n");
exit(EXIT_FAILURE);
+ }
if (og_dbi_schedule_get() < 0) {
syslog(LOG_ERR, "Cannot connect to database\n");
diff --git a/src/schema.c b/src/schema.c
index 56d52ba..d31046e 100644
--- a/src/schema.c
+++ b/src/schema.c
@@ -255,13 +255,11 @@ int og_dbi_schema_update(void)
{
int version, i, err;
struct og_dbi *dbi;
- const char *msglog;
dbi = og_dbi_open(&ogconfig.db);
if (!dbi) {
- dbi_conn_error(dbi->conn, &msglog);
- syslog(LOG_ERR, "failed to query database (%s:%d) %s\n",
- __func__, __LINE__, msglog);
+ syslog(LOG_ERR, "cannot open a database connection (%s:%d)\n",
+ __func__, __LINE__);
return -1;
}