strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
248a1f5
)
do not respawn cancelled threads if we are shutting down
author
Martin Willi
<martin@strongswan.org>
Fri, 12 Dec 2008 15:57:12 +0000
(15:57 -0000)
committer
Martin Willi
<martin@strongswan.org>
Fri, 12 Dec 2008 15:57:12 +0000
(15:57 -0000)
src/charon/processing/processor.c
patch
|
blob
|
history
diff --git
a/src/charon/processing/processor.c
b/src/charon/processing/processor.c
index
a5f1833
..
156c65b
100644
(file)
--- a/
src/charon/processing/processor.c
+++ b/
src/charon/processing/processor.c
@@
-84,7
+84,9
@@
static void restart(private_processor_t *this)
{
pthread_t thread;
- if (pthread_create(&thread, NULL, (void*)process_jobs, this) != 0)
+ /* respawn thread if required */
+ if (this->desired_threads == 0 ||
+ pthread_create(&thread, NULL, (void*)process_jobs, this) != 0)
{
this->mutex->lock(this->mutex);
this->total_threads--;