diff options
author | Martin Willi <martin@strongswan.org> | 2008-04-03 08:37:24 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-04-03 08:37:24 +0000 |
commit | 6af29ccf33a3e2c0feb5724a60591b8abeb9339b (patch) | |
tree | 7d184200aab03ffbd4bc31f7eac287c6221c6c88 | |
parent | 6e4e27f8deddc817c9c1079429318ba48003ad33 (diff) | |
download | strongswan-6af29ccf33a3e2c0feb5724a60591b8abeb9339b.tar.bz2 strongswan-6af29ccf33a3e2c0feb5724a60591b8abeb9339b.tar.xz |
configure option in strongswan.conf for thread count
-rw-r--r-- | src/charon/daemon.c | 4 | ||||
-rw-r--r-- | src/charon/daemon.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/charon/daemon.c b/src/charon/daemon.c index cc41b1431..3120cc2eb 100644 --- a/src/charon/daemon.c +++ b/src/charon/daemon.c @@ -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); diff --git a/src/charon/daemon.h b/src/charon/daemon.h index 9dc29470b..9da7953f0 100644 --- a/src/charon/daemon.h +++ b/src/charon/daemon.h @@ -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. |