]> code.citadel.org Git - citadel.git/blobdiff - citadel/database.c
* Debugged all possible ways for a session to terminate; do them cleanly.
[citadel.git] / citadel / database.c
index ee2e2422fe4e43662c31bbc81dfbcac0da32a1d5..79ae1981344ccdd24c7b36b0f556370626e718ac 100644 (file)
@@ -23,9 +23,6 @@
 #include <ctype.h>
 #include <string.h>
 #include <errno.h>
-#ifdef HAVE_PTHREAD_H
-#include <pthread.h>
-#endif
 #ifdef HAVE_GDBM_H
 #include <gdbm.h>
 #endif
@@ -42,7 +39,8 @@ GDBM_FILE gdbms[MAXCDB];
 
 /*
  * We also keep these around, for sequential searches... (one per 
- * session.  Maybe there's a better way?)
+ * session.  Maybe there's a better way?)    FIX ... there _is_ a better
+ * way.  We have TSD functions now; use them.
  */
 #define MAXKEYS 256
 datum dtkey[MAXKEYS];
@@ -97,6 +95,8 @@ void defrag_databases(void) {
 void open_databases(void) {
        int a;
 
+       lprintf(7, "%s\n", gdbm_version);
+
        /*
         * Silently try to create the database subdirectory.  If it's
         * already there, no problem.
@@ -177,11 +177,6 @@ void open_databases(void) {
 void close_databases(void) {
        int a;
 
-       /* Hmm... we should decide when would be a good time to defrag.
-        * Server shutdowns might be an opportune time.
-       defrag_databases();
-        */
-
        begin_critical_section(S_DATABASE);
        for (a=0; a<MAXCDB; ++a) {
                lprintf(7, "Closing database %d\n", a);