* Changed 'number of worker threads' from a sysconfig.h #define to an actual
[citadel.git] / citadel / config.c
index a9ad7f7115f16551ccd41cad69b9995e9fbd0b79..3b81fec3f1fcb67fbf64ba28ac1759a722a9c2da 100644 (file)
@@ -78,6 +78,14 @@ void get_config(void) {
                 config.c_maxmsglen = INT_MAX;
         if (config.c_maxmsglen < 8192)
                 config.c_maxmsglen = 8192;
+
+        /* Default number of worker threads is 15 and the minimum is 5
+         */
+       /* Can't have fewer than two worker threads */
+       if (config.c_worker_threads == 0)
+               config.c_worker_threads = 15;
+       if (config.c_worker_threads < 5)
+               config.c_worker_threads = 5;
                
 }