* regulary shut down libcitadel, so we don't leak the icondir hash on shutdown.
authorWilfried Göesgens <willi@citadel.org>
Sun, 20 Apr 2008 20:55:17 +0000 (20:55 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 20 Apr 2008 20:55:17 +0000 (20:55 +0000)
webcit/webserver.c

index 9ecc7d5d413450be1dba07f492a06a4b466ab2ef..304241e69ba434de3bb05179ae1259fe52a44705 100644 (file)
@@ -567,6 +567,7 @@ void start_daemon(char *pid_file)
        
                if (current_child < 0) {
                        perror("fork");
+                       ShutDownLibCitadel ();
                        exit(errno);
                }
        
@@ -621,6 +622,7 @@ void start_daemon(char *pid_file)
        if (pid_file) {
                unlink(pid_file);
        }
+       ShutDownLibCitadel ();
        exit(WEXITSTATUS(status));
 }
 
@@ -924,6 +926,7 @@ int main(int argc, char **argv)
 
        /* now the original thread becomes another worker */
        worker_entry();
+       ShutDownLibCitadel ();
        return 0;
 }
 
@@ -998,6 +1001,7 @@ void worker_entry(void)
                                free_zone_directory ();
                                icaltimezone_release_zone_tab ();
                                icalmemory_free_ring ();
+                               ShutDownLibCitadel ();
                                lprintf(2, "master shutdown exiting!.\n");                              
                                exit(0);
                        }