From 1edf116cfd5d08c067c847969ee433b463a1f796 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 20 Mar 2007 08:15:53 +0000 Subject: [PATCH] cleanups fixed reset() --- src/charon/sa/task_manager.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/charon/sa/task_manager.c b/src/charon/sa/task_manager.c index be35cea97..0bcc9e140 100644 --- a/src/charon/sa/task_manager.c +++ b/src/charon/sa/task_manager.c @@ -128,11 +128,6 @@ struct private_task_manager_t { * List of tasks initiated by peer */ linked_list_t *passive_tasks; - - /** - * ike_sa_init message we sent, stored here for later authentication - */ - packet_t *ike_sa_init; }; /** @@ -701,12 +696,11 @@ static void reset(private_task_manager_t *this) /* reset message counters and retransmit packets */ DESTROY_IF(this->responding.packet); DESTROY_IF(this->initiating.packet); - DESTROY_IF(this->ike_sa_init); this->responding.packet = NULL; this->initiating.packet = NULL; - this->ike_sa_init = NULL; this->responding.mid = 0; - this->initiating.mid = -1; + this->initiating.mid = 0; + this->initiating.type = EXCHANGE_TYPE_UNDEFINED; /* reset active tasks */ while (this->active_tasks->remove_last(this->active_tasks, @@ -761,7 +755,6 @@ static void destroy(private_task_manager_t *this) this->active_tasks->destroy(this->active_tasks); DESTROY_IF(this->responding.packet); DESTROY_IF(this->initiating.packet); - DESTROY_IF(this->ike_sa_init); free(this); } @@ -790,7 +783,6 @@ task_manager_t *task_manager_create(ike_sa_t *ike_sa) this->queued_tasks = linked_list_create(); this->active_tasks = linked_list_create(); this->passive_tasks = linked_list_create(); - this->ike_sa_init = NULL; return &this->public; }