Stefan Sperling has submitted this change and it was merged.

Change subject: Improve an error message in db_init().
......................................................................


Improve an error message in db_init().

If we cannot open a connection to the sqlite3 database, show the name of the
database we failed to access, and also hint at the fact that a likely reason
for the problem is a missing sqlite3 driver for libdbi.

Change-Id: If1c0026e882984b4358ce116ec4a7ad40340517c
---
M src/libmsc/db.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/db.c b/src/libmsc/db.c
index 28004f7..7007c7a 100644
--- a/src/libmsc/db.c
+++ b/src/libmsc/db.c
@@ -614,7 +614,8 @@
 
        conn = dbi_conn_new_r("sqlite3", inst);
        if (conn == NULL) {
-               LOGP(DDB, LOGL_FATAL, "Failed to create connection.\n");
+               LOGP(DDB, LOGL_FATAL, "Failed to create database connection to 
sqlite3 db '%s'; "
+                   "Is the sqlite3 database driver for libdbi installed on 
this system?\n", name);
                return 1;
        }
 

-- 
To view, visit https://gerrit.osmocom.org/5795
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If1c0026e882984b4358ce116ec4a7ad40340517c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling <ssperl...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Stefan Sperling <ssperl...@sysmocom.de>

Reply via email to