summaryrefslogtreecommitdiff
path: root/src/charon/processing/processor.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2009-02-28 22:02:31 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2009-02-28 22:02:31 +0000
commit19364e11c66714324bd3d5d0dc9212db397085cb (patch)
treefe7f5e55f0474dad1d0c29ba7c0a6f4546c99c3a /src/charon/processing/processor.c
parentc7f1b0530b85bc7654e68992f25ed8ced5d0a80d (diff)
downloadvyos-strongswan-19364e11c66714324bd3d5d0dc9212db397085cb.tar.gz
vyos-strongswan-19364e11c66714324bd3d5d0dc9212db397085cb.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.2.12)
Diffstat (limited to 'src/charon/processing/processor.c')
-rw-r--r--src/charon/processing/processor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/charon/processing/processor.c b/src/charon/processing/processor.c
index 9cff090bf..68916937b 100644
--- a/src/charon/processing/processor.c
+++ b/src/charon/processing/processor.c
@@ -13,7 +13,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * $Id: processor.c 4579 2008-11-05 11:29:56Z martin $
+ * $Id: processor.c 4802 2008-12-12 15:57:12Z martin $
*/
#include <stdlib.h>
@@ -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--;