* database_sleepycat.c: make cdb_rewind enforce that cursors must be
authorNathan Bryant <loanshark@uncensored.citadel.org>
Thu, 11 Nov 2004 16:21:12 +0000 (16:21 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Thu, 11 Nov 2004 16:21:12 +0000 (16:21 +0000)
  closed before they can be opened again. (prevents cursors being held
  open for longer than they should be and holding database locks.)

citadel/ChangeLog
citadel/database_sleepycat.c

index e21c6d7a9aeeff2a1f36a0aa32f4c7b52965398e..a541de62311ef3c848f8f320b4645d43f03c3df7 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index 18c1f10fc98a8dafa0c137538c9c9f958568c337..94fc73ee10f4904fb29470241578cd8ef5b505af 100644 (file)
@@ -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