DB: produce a backtrace in case of a DB error

This helps us to identify where exactly in our code the DB error
originates from.
This commit is contained in:
Harald Welte 2014-07-10 20:18:15 +02:00
parent 9b62580595
commit c7548a116c
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ void db_error_func(dbi_conn conn, void *data)
const char *msg;
dbi_conn_error(conn, &msg);
LOGP(DDB, LOGL_ERROR, "DBI: %s\n", msg);
osmo_log_backtrace(DDB, LOGL_ERROR);
}
static int update_db_revision_2(void)