]> code.citadel.org Git - citadel.git/blobdiff - citadel/housekeeping.c
- port to Cygwin (DLL support, etc.)
[citadel.git] / citadel / housekeeping.c
index 34ca22092ed3f672bd290fba136420474d09b326..451f6491dfebbf9bb682b25e0c6cf688c7bf7bd9 100644 (file)
@@ -5,6 +5,10 @@
  *
  */
 
+#ifdef DLL_EXPORT
+#define IN_LIBCIT
+#endif
+
 #include "sysdep.h"
 #include <stdlib.h>
 #include <unistd.h>
@@ -33,6 +37,7 @@
 #include "tools.h"
 #include "citadel.h"
 #include "server.h"
+#include "dynloader.h"
 #include "citserver.h"
 #include "config.h"
 #include "housekeeping.h"
@@ -108,7 +113,9 @@ void check_ref_counts(void) {
                putfloor(&flbuf, a);
        }
 
+       cdb_begin_transaction();
        ForEachRoom(check_ref_counts_backend, NULL);
+       cdb_end_transaction();
 }      
 
 /*
@@ -119,7 +126,7 @@ void check_ref_counts(void) {
  */
 void do_housekeeping(void) {
        static int housekeeping_in_progress = 0;
-       time_t last_timer = 0L;
+       static time_t last_timer = 0L;
        int do_housekeeping_now = 0;
 
        /*