configure option in strongswan.conf for thread count
authorMartin Willi <martin@strongswan.org>
Thu, 3 Apr 2008 08:37:24 +0000 (08:37 -0000)
committerMartin Willi <martin@strongswan.org>
Thu, 3 Apr 2008 08:37:24 +0000 (08:37 -0000)
src/charon/daemon.c
src/charon/daemon.h

index cc41b14..3120cc2 100644 (file)
@@ -584,7 +584,9 @@ int main(int argc, char *argv[])
        drop_capabilities(private_charon, TRUE);
        
        /* start the engine, go multithreaded */
-       charon->processor->set_threads(charon->processor, WORKER_THREADS);
+       charon->processor->set_threads(charon->processor,
+                                               lib->settings->get_int(lib->settings, "charon.threads",
+                                                                                          DEFAULT_THREADS));
        
        /* run daemon */
        run(private_charon);
index 9dc2947..9da7953 100644 (file)
@@ -172,9 +172,9 @@ typedef struct daemon_t daemon_t;
 #define DAEMON_NAME "charon"
 
 /**
- * Number of threads in the thread pool.
+ * Number of threads in the thread pool, if not specified in config.
  */
-#define WORKER_THREADS 16
+#define DEFAULT_THREADS 16
 
 /**
  * UDP Port on which the daemon will listen for incoming traffic.