* database_sleepycat.c: emit a panic message when Berkeley DB wants us to
authorMichael Hampton <io_error@uncensored.citadel.org>
Sun, 21 Mar 2004 22:34:41 +0000 (22:34 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sun, 21 Mar 2004 22:34:41 +0000 (22:34 +0000)
  run recovery; should provide a little more detail on the actual error

citadel/ChangeLog
citadel/database_sleepycat.c

index 90c622f904bb03aefdd896d9ccb6e22a73dd3b26..94b564eb6df2a177a990be3409a280b06d4be754 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 778ba6a7acfa8447002e9b86bf38e75974c5ee8d..0d734bfd97c92df0bdef160c313a42c25db22213 100644 (file)
@@ -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,