]> code.citadel.org Git - citadel.git/blobdiff - webcit/webserver.c
* correct all GetNextHashPos() calls to have const chars
[citadel.git] / webcit / webserver.c
index b6cdd996068d3349e8ee02c9577d292c47d7c2e3..32887f47c642a0a0bd0421431bb751bde7aa1c07 100644 (file)
@@ -587,6 +587,7 @@ void spawn_another_worker_thread()
 const char foobuf[32];
 const char *nix(void *vptr) {snprintf(foobuf, 32, "%0x", (long) vptr); return foobuf;}
 #endif 
+void InitTemplateCache(void);
 
 /*
  * \brief Here's where it all begins.
@@ -619,10 +620,11 @@ int main(int argc, char **argv)
        PreferenceHooks = NewHash(1, NULL);
        WirelessTemplateCache = NewHash(1, NULL);
        WirelessLocalTemplateCache = NewHash(1, NULL);
-       TemplateCache = NewHash(1, NULL);
        LocalTemplateCache = NewHash(1, NULL);
+       TemplateCache = NewHash(1, NULL);
+       GlobalNS = NewHash(1, NULL);
+       Iterators = NewHash(1, NULL);
 
-       initialise_modules();
 
 #ifdef DBG_PRINNT_HOOKS_AT_START
        dbg_PrintHash(HandlerHash, nix, NULL);
@@ -794,6 +796,9 @@ int main(int argc, char **argv)
                perror("chdir");
        }
        LoadIconDir(static_icon_dir);
+       InitTemplateCache();
+
+       initialise_modules();
        initialize_viewdefs();
        initialize_axdefs();
 
@@ -944,6 +949,12 @@ void worker_entry(void)
                                ShutDownLibCitadel ();
                                DeleteHash(&HandlerHash);
                                DeleteHash(&PreferenceHooks);
+                               DeleteHash(&GlobalNS);
+                               DeleteHash(&WirelessTemplateCache);
+                               DeleteHash(&WirelessLocalTemplateCache);
+                               DeleteHash(&TemplateCache);
+                               DeleteHash(&LocalTemplateCache);
+                               DeleteHash(&Iterators);
 #ifdef ENABLE_NLS
                                void ShutdownLocale(void);
 #endif