From 4d013d007479683d08bb4e504950dbb0a233a1d4 Mon Sep 17 00:00:00 2001 From: Michael Hampton Date: Sun, 21 Mar 2004 22:34:41 +0000 Subject: [PATCH] * database_sleepycat.c: emit a panic message when Berkeley DB wants us to run recovery; should provide a little more detail on the actual error --- citadel/ChangeLog | 5 ++++- citadel/database_sleepycat.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 90c622f90..94b564eb6 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,8 @@ $Log$ + Revision 614.91 2004/03/21 22:34:41 error + * database_sleepycat.c: emit a panic message when Berkeley DB wants us to + run recovery; should provide a little more detail on the actual error + Revision 614.90 2004/03/21 22:32:24 ajc * room_ops.c: increased the thread safety of cgetfloor() * housekeeping.c: check floor reference counts in two passes instead of @@ -5570,4 +5574,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/database_sleepycat.c b/citadel/database_sleepycat.c index 778ba6a7a..0d734bfd9 100644 --- a/citadel/database_sleepycat.c +++ b/citadel/database_sleepycat.c @@ -109,6 +109,11 @@ static void txbegin(DB_TXN **tid) { } } +static void dbpanic(DB_ENV* env, int errval) +{ + lprintf(CTDL_EMERG, "cdb_*: Berkeley DB panic: %d\n", errval); +} + static void cclose(DBC *cursor) { int ret; @@ -304,6 +309,7 @@ void open_databases(void) exit(ret); } dbenv->set_errpfx(dbenv, "citserver"); + dbenv->set_paniccall(dbenv, dbpanic); /* * We want to specify the shared memory buffer pool cachesize, -- 2.30.2