aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/db.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-01-15 16:12:37 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-01-16 14:21:16 +0100
commit832046d38311ff0a4578e05bf20681b3f796e5f6 (patch)
tree7d2c361b8b91e789c687a4c9e496cc16588323c8 /src/libmsc/db.c
parentce4e984fe870242775cd8825a17d7e810c5a771e (diff)
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
Diffstat (limited to 'src/libmsc/db.c')
-rw-r--r--src/libmsc/db.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libmsc/db.c b/src/libmsc/db.c
index 28004f7e4..7007c7af1 100644
--- a/src/libmsc/db.c
+++ b/src/libmsc/db.c
@@ -614,7 +614,8 @@ int db_init(const char *name)
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;
}