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.
This commit is contained in:
committed by
Martin Willi
parent
5ed3e3a7e6
commit
d68b8dfec4
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user