configure option in strongswan.conf for thread count

This commit is contained in:
Martin Willi
2008-04-03 08:37:24 +00:00
parent 6e4e27f8de
commit 6af29ccf33
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -584,7 +584,9 @@ int main(int argc, char *argv[])
drop_capabilities(private_charon, TRUE); drop_capabilities(private_charon, TRUE);
/* start the engine, go multithreaded */ /* 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 daemon */
run(private_charon); run(private_charon);
+2 -2
View File
@@ -172,9 +172,9 @@ typedef struct daemon_t daemon_t;
#define DAEMON_NAME "charon" #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. * UDP Port on which the daemon will listen for incoming traffic.