diff options
| author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2009-03-01 10:48:08 +0000 |
|---|---|---|
| committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2009-03-01 10:48:08 +0000 |
| commit | a6f902baed7abb17a1a9c014e01bb100077f8198 (patch) | |
| tree | 82114e22e251e9260d9a712f1232e52e1ef494e3 /src/charon/processing/processor.c | |
| parent | 1450c9df799b0870477f6e63357f4bcb63537f4f (diff) | |
| download | vyos-strongswan-a6f902baed7abb17a1a9c014e01bb100077f8198.tar.gz vyos-strongswan-a6f902baed7abb17a1a9c014e01bb100077f8198.zip | |
- Updated to new upstream revision.
Diffstat (limited to 'src/charon/processing/processor.c')
| -rw-r--r-- | src/charon/processing/processor.c | 6 |
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--; |
