]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/expire/serv_expire.c
Here it is, the new thread interface.
[citadel.git] / citadel / modules / expire / serv_expire.c
index ee41a5f84f4546a19745ff799875732024db988d..4902af16b0a4d0aad4c3e74f6a2d99f930a95082 100644 (file)
@@ -49,6 +49,7 @@
 #include <sys/wait.h>
 #include <string.h>
 #include <limits.h>
+#include <libcitadel.h>
 #include "citadel.h"
 #include "server.h"
 #include "citserver.h"
@@ -61,7 +62,6 @@
 #include "user_ops.h"
 #include "control.h"
 #include "serv_network.h"      /* Needed for defenition of UseTable */
-#include "tools.h"
 
 
 #include "ctdl_module.h"
@@ -844,9 +844,12 @@ void cmd_fsck(char *argbuf) {
 
 CTDL_MODULE_INIT(expire)
 {
-       CtdlRegisterSessionHook(purge_databases, EVT_TIMER);
-       CtdlRegisterProtoHook(cmd_fsck, "FSCK", "Check message ref counts");
-
+       if (!threading)
+       {
+               CtdlRegisterSessionHook(purge_databases, EVT_TIMER);
+               CtdlRegisterProtoHook(cmd_fsck, "FSCK", "Check message ref counts");
+       }
+       
        /* return our Subversion id for the Log */
        return "$Id$";
 }