diff options
author | Martin Willi <martin@revosec.ch> | 2014-05-07 15:12:09 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2014-05-07 15:12:09 +0200 |
commit | 954c63a4bc6d12b5a6a9b5e4fa010be9c1727163 (patch) | |
tree | 29652983aa269592955c7f3fc9e229b5f3e4a544 /src/libstrongswan/processing/processor.c | |
parent | dba3c649da9eae16b82e502eddb7efe11f3e3ae4 (diff) | |
parent | 4787523cc32553dd569ba9f643532aaae64a8b24 (diff) | |
download | strongswan-954c63a4bc6d12b5a6a9b5e4fa010be9c1727163.tar.bz2 strongswan-954c63a4bc6d12b5a6a9b5e4fa010be9c1727163.tar.xz |
Merge branch 'vici'
Introduces the vici plugin providing a Versatile IKE Configuration Interface
to configure, monitor and control the IKE daemon charon over a stable IPC
socket interface.
Diffstat (limited to 'src/libstrongswan/processing/processor.c')
-rw-r--r-- | src/libstrongswan/processing/processor.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libstrongswan/processing/processor.c b/src/libstrongswan/processing/processor.c index 012b169e3..27e5ab5f6 100644 --- a/src/libstrongswan/processing/processor.c +++ b/src/libstrongswan/processing/processor.c @@ -467,6 +467,8 @@ METHOD(processor_t, cancel, void, { enumerator_t *enumerator; worker_thread_t *worker; + job_t *job; + int i; this->mutex->lock(this->mutex); this->desired_threads = 0; @@ -496,6 +498,14 @@ METHOD(processor_t, cancel, void, worker->thread->join(worker->thread); free(worker); } + for (i = 0; i < JOB_PRIO_MAX; i++) + { + while (this->jobs[i]->remove_first(this->jobs[i], + (void**)&job) == SUCCESS) + { + job->destroy(job); + } + } this->mutex->unlock(this->mutex); } @@ -510,7 +520,7 @@ METHOD(processor_t, destroy, void, this->mutex->destroy(this->mutex); for (i = 0; i < JOB_PRIO_MAX; i++) { - this->jobs[i]->destroy_offset(this->jobs[i], offsetof(job_t, destroy)); + this->jobs[i]->destroy(this->jobs[i]); } this->threads->destroy(this->threads); free(this); |