Here it is, the new thread interface.
[citadel.git] / citadel / housekeeping.c
index 99f0d792fa764e6ba488d1b003aa33885b127b75..1dd18d61e82532a12556f58baf8cba923eaa128a 100644 (file)
@@ -30,7 +30,7 @@
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
-#include "tools.h"
+#include <libcitadel.h>
 #include "citadel.h"
 #include "server.h"
 #include "serv_extensions.h"
@@ -43,9 +43,8 @@
 #include "msgbase.h"
 #include "journaling.h"
 
-#ifdef HAVE_LIBSIEVE
-# include "serv_sieve.h"
-#endif
+#include "ctdl_module.h"
+
 
 /*
  * Terminate idle sessions.  This function pounds through the session table
@@ -80,8 +79,7 @@ void terminate_idle_sessions(void) {
 void check_sched_shutdown(void) {
        if ((ScheduledShutdown == 1) && (ContextList == NULL)) {
                lprintf(CTDL_NOTICE, "Scheduled shutdown initiating.\n");
-               time_to_die = 1;
-               master_cleanup(0);
+               CtdlThreadStopAll();
        }
 }