aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-04-03 08:37:24 +0000
committerMartin Willi <martin@strongswan.org>2008-04-03 08:37:24 +0000
commit6af29ccf33a3e2c0feb5724a60591b8abeb9339b (patch)
tree7d184200aab03ffbd4bc31f7eac287c6221c6c88 /src/charon
parent6e4e27f8deddc817c9c1079429318ba48003ad33 (diff)
downloadstrongswan-6af29ccf33a3e2c0feb5724a60591b8abeb9339b.tar.bz2
strongswan-6af29ccf33a3e2c0feb5724a60591b8abeb9339b.tar.xz
configure option in strongswan.conf for thread count
Diffstat (limited to 'src/charon')
-rw-r--r--src/charon/daemon.c4
-rw-r--r--src/charon/daemon.h4
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.