DB: more backtraces in case of errors
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 9 Feb 2013 12:24:44 +0000 (13:24 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 25 Feb 2013 19:07:48 +0000 (20:07 +0100)
citadel/database.c

index cdc732cdc8082e90d197d861bdc35889c549942f..e2654b6e65fb010219e41d8807a1df2842579774 100644 (file)
@@ -89,6 +89,7 @@ void cdb_verbose_log(const DB_ENV *dbenv, const char *msg)
 {
        if (!IsEmptyStr(msg)) {
                syslog(LOG_DEBUG, "DB: %s", msg);
+               cit_backtrace();
        }
 }
 
@@ -97,6 +98,7 @@ void cdb_verbose_log(const DB_ENV *dbenv, const char *msg)
 void cdb_verbose_err(const DB_ENV *dbenv, const char *errpfx, const char *msg)
 {
        syslog(LOG_ALERT, "DB: %s", msg);
+       cit_backtrace();
 }
 
 
@@ -142,6 +144,7 @@ static void txbegin(DB_TXN ** tid)
 static void dbpanic(DB_ENV * env, int errval)
 {
        syslog(LOG_EMERG, "bdb(): PANIC: %s", db_strerror(errval));
+       cit_backtrace();
 }
 
 static void cclose(DBC * cursor)