* Wrap housekeeper and timer events in transaction open/close functions
[citadel.git] / citadel / housekeeping.c
index c9ffcfb9ee62d41cd5b25369e5b4dbb57a4204b1..aa380f12b8074ed61148a1b779b5e4900344db01 100644 (file)
@@ -29,6 +29,7 @@
 #include "housekeeping.h"
 #include "sysdep_decls.h"
 #include "room_ops.h"
+#include "database.h"
 
 
 int housepipe[2];      /* This is the queue for housekeeping tasks */
@@ -112,6 +113,7 @@ void housekeeping_loop(void) {
                        }
 
                        extract(cmd, house_cmd, 0);
+                       cdb_begin_transaction();
 
                        /* Do whatever this cmd requires */
 
@@ -130,6 +132,8 @@ void housekeeping_loop(void) {
                                lprintf(7, "Unknown housekeeping command\n");
                        }
 
+                       cdb_end_transaction();
+
                } while (did_something);
        }
 }