~ubuntu-branches/ubuntu/maverick/strongswan/maverick

« back to all changes in this revision

Viewing changes to src/charon/processing/processor.c

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2009-04-01 22:17:52 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090401221752-eozrk0ctabblo94z
* New upstream release, which incorporates the fix. Removed dpatch for it.
  Closes: #521950: CVE-2009-0790: DoS
* New support for EAP RADIUS authentication, enabled for this package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
14
 * for more details.
15
15
 *
16
 
 * $Id: processor.c 4579 2008-11-05 11:29:56Z martin $
 
16
 * $Id: processor.c 4802 2008-12-12 15:57:12Z martin $
17
17
 */
18
18
 
19
19
#include <stdlib.h>
84
84
{
85
85
        pthread_t thread;
86
86
        
87
 
        if (pthread_create(&thread, NULL, (void*)process_jobs, this) != 0)
 
87
        /* respawn thread if required */
 
88
        if (this->desired_threads == 0 ||
 
89
                pthread_create(&thread, NULL, (void*)process_jobs, this) != 0)
88
90
        {
89
91
                this->mutex->lock(this->mutex);
90
92
                this->total_threads--;