Finished all of the code relating to the "global server info" stuff defined
[citadel.git] / citadel / citserver.c
index 94de0e6eb55fa6c75e7fe30f23868683ef8fa700..bdd477b892a7b33763de9004975d1c902fd2f964 100644 (file)
@@ -49,10 +49,22 @@ void rec_log(unsigned int lrtype, char *name)
        end_critical_section(S_CALLLOG);
        }
 
+
+/*
+ * Various things that need to be initialized at startup
+ */
+void master_startup() {
+       lprintf(7, "Opening databases\n");
+       open_databases();
+
+       lprintf(7, "Checking floor reference counts\n");
+       check_ref_counts();
+       }
+
 /*
  * Cleanup routine to be called when the server is shutting down.
  */
-void master_cleanup(void) {
+void master_cleanup() {
 
        /* Cancel all running sessions */
        lprintf(7, "Cancelling running sessions...\n");
@@ -60,6 +72,10 @@ void master_cleanup(void) {
                kill_session(ContextList->cs_pid);
                }
 
+       /* Close databases */
+       lprintf(7, "Closing databases\n");
+       close_databases();
+
        /* Do system-dependent stuff */
        sysdep_master_cleanup();