Moved all threading code into threads.c
[citadel.git] / citadel / citserver.c
index 088d6ceba92e1d1b6a30ef27d74951f2d429bd43..e1b2135f7aec14d5cf1f14f82a13e727e8547fd5 100644 (file)
@@ -44,6 +44,7 @@
 #include "citadel.h"
 #include "server.h"
 #include "sysdep_decls.h"
+#include "threads.h"
 #include "citserver.h"
 #include "config.h"
 #include "database.h"
@@ -196,13 +197,13 @@ void master_cleanup(int exitcode) {
        /* Close the AdjRefCount queue file */
        AdjRefCount(-1, 0);
 
+       /* Do system-dependent stuff */
+       sysdep_master_cleanup();
+       
        /* Close databases */
        lprintf(CTDL_INFO, "Closing databases\n");
        close_databases();
 
-       /* Do system-dependent stuff */
-       sysdep_master_cleanup();
-       
 #ifdef DEBUG_MEMORY_LEAKS
        dump_heap();
 #endif