Here it is, the new thread interface.
[citadel.git] / citadel / housekeeping.c
index cbc8a1c42c5c70506e2f79bad4b2d75c93d45fff..1dd18d61e82532a12556f58baf8cba923eaa128a 100644 (file)
@@ -43,6 +43,9 @@
 #include "msgbase.h"
 #include "journaling.h"
 
+#include "ctdl_module.h"
+
+
 /*
  * Terminate idle sessions.  This function pounds through the session table
  * comparing the current time to each session's time-of-last-command.  If an
@@ -76,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();
        }
 }
 
@@ -168,8 +170,6 @@ void do_housekeeping(void) {
        JournalRunQueue();
 
        PerformSessionHooks(EVT_HOUSE); /* perform as needed housekeeping */
-       
-       ctdl_internal_thread_gc(0);
 
        /* Then, do the "once per minute" stuff... */
        if (do_perminute_housekeeping_now) {