From: Nathan Bryant Date: Thu, 11 Nov 2004 16:21:12 +0000 (+0000) Subject: * database_sleepycat.c: make cdb_rewind enforce that cursors must be X-Git-Tag: v7.86~5201 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=a5f57cef10dce5b90e10b904d33379e04b551925 * database_sleepycat.c: make cdb_rewind enforce that cursors must be closed before they can be opened again. (prevents cursors being held open for longer than they should be and holding database locks.) --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index e21c6d7a9..a541de623 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,9 @@ $Log$ + Revision 627.6 2004/11/11 16:21:12 nbryant + * database_sleepycat.c: make cdb_rewind enforce that cursors must be + closed before they can be opened again. (prevents cursors being held + open for longer than they should be and holding database locks.) + Revision 627.5 2004/11/11 14:56:16 ajc * Further adjustments to ldap setup @@ -6207,3 +6212,4 @@ 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 18c1f10fc..94fc73ee1 100644 --- a/citadel/database_sleepycat.c +++ b/citadel/database_sleepycat.c @@ -758,8 +758,11 @@ void cdb_rewind(int cdb) { int ret = 0; - if (MYCURSORS[cdb] != NULL) - cclose(MYCURSORS[cdb]); + if (MYCURSORS[cdb] != NULL) { + lprintf(CTDL_EMERG, "cdb_rewind: must close cursor on database %d before reopening.\n", cdb); + abort(); + //cclose(MYCURSORS[cdb]); + } /* * Now initialize the cursor