]> code.citadel.org Git - citadel.git/blobdiff - citadel/server_main.c
Patches from Matt with slight mod from me to do without strlen. Also modified lprintf...
[citadel.git] / citadel / server_main.c
index 23ef71d91df4f136fe26746fd6f40a3330e764e1..4c69e608342f9c9c3af4aa9cdc653f77f279b3fa 100644 (file)
@@ -87,6 +87,11 @@ int main(int argc, char **argv)
 #ifdef HAVE_RUN_DIR
        struct stat filestats;
 #endif
+
+       /* initialise semaphores here. Patch by Matt and davew
+        * its called here as they are needed by lprintf for thread safety
+        */
+       InitialiseSemaphores();
        
        /* initialize the master context */
        InitializeMasterCC();
@@ -297,7 +302,7 @@ int main(int argc, char **argv)
        }
        end_critical_section(S_WORKER_LIST);
 
-       /* Create the indexer thread. */
+       /* Create the maintenance threads. */
        create_maintenance_threads();
 
        /* This thread is now useless.  It can't be turned into a worker