diff options
author | Thomas Egerer <thomas.egerer@secunet.com> | 2012-01-16 17:41:47 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-01-18 10:06:54 +0100 |
commit | d68b8dfec490c553c6a1fe3907d8bb590a1ba165 (patch) | |
tree | 92a916085caeaa28d237a973965104fb23a0d5ef /src | |
parent | 5ed3e3a7e64ed0c01a32d2f517e8a1d63226e986 (diff) | |
download | strongswan-d68b8dfec490c553c6a1fe3907d8bb590a1ba165.tar.bz2 strongswan-d68b8dfec490c553c6a1fe3907d8bb590a1ba165.tar.xz |
Destroy active task list before queued tasks
Since active task's destruction might result in adopting tasks from a
rekeyed ike sa it seems better to first destroy the active task list and
then destroy all queued tasks. This way adoption is possible at all,
while otherwise the queued task list would be empty.
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/task_manager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcharon/sa/task_manager.c b/src/libcharon/sa/task_manager.c index 473bf34f1..dad533b31 100644 --- a/src/libcharon/sa/task_manager.c +++ b/src/libcharon/sa/task_manager.c @@ -159,15 +159,15 @@ struct private_task_manager_t { */ static void flush(private_task_manager_t *this) { - this->queued_tasks->destroy_offset(this->queued_tasks, - offsetof(task_t, destroy)); - this->queued_tasks = linked_list_create(); this->passive_tasks->destroy_offset(this->passive_tasks, offsetof(task_t, destroy)); this->passive_tasks = linked_list_create(); this->active_tasks->destroy_offset(this->active_tasks, offsetof(task_t, destroy)); this->active_tasks = linked_list_create(); + this->queued_tasks->destroy_offset(this->queued_tasks, + offsetof(task_t, destroy)); + this->queued_tasks = linked_list_create(); } /** |