diff options
author | Martin Willi <martin@revosec.ch> | 2012-05-21 14:17:09 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-05-21 14:17:09 +0200 |
commit | 7ce504e182c1ce1cde7c80e7dfe2a70b3e5dbed4 (patch) | |
tree | 47c862183f50aaeb19340c1fe7130c58c1c9f7bd /src/libcharon/sa/ikev1/tasks/aggressive_mode.c | |
parent | cbc1a20ffe69fae5ae7fc216873c7ee7d737e103 (diff) | |
download | strongswan-7ce504e182c1ce1cde7c80e7dfe2a70b3e5dbed4.tar.bz2 strongswan-7ce504e182c1ce1cde7c80e7dfe2a70b3e5dbed4.tar.xz |
Flush task queues explicitly, not implicitly if task returns ALREADY_DONE
Diffstat (limited to 'src/libcharon/sa/ikev1/tasks/aggressive_mode.c')
-rw-r--r-- | src/libcharon/sa/ikev1/tasks/aggressive_mode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcharon/sa/ikev1/tasks/aggressive_mode.c b/src/libcharon/sa/ikev1/tasks/aggressive_mode.c index 9621e7099..4c581cdb6 100644 --- a/src/libcharon/sa/ikev1/tasks/aggressive_mode.c +++ b/src/libcharon/sa/ikev1/tasks/aggressive_mode.c @@ -174,6 +174,8 @@ static status_t send_notify(private_aggressive_mode_t *this, notify_type_t type) this->ike_sa->queue_task(this->ike_sa, (task_t*)informational_create(this->ike_sa, notify)); /* cancel all active/passive tasks in favour of informational */ + this->ike_sa->flush_queue(this->ike_sa, + this->initiator ? TASK_QUEUE_ACTIVE : TASK_QUEUE_PASSIVE); return ALREADY_DONE; } @@ -185,6 +187,8 @@ static status_t send_delete(private_aggressive_mode_t *this) this->ike_sa->queue_task(this->ike_sa, (task_t*)isakmp_delete_create(this->ike_sa, TRUE)); /* cancel all active tasks in favour of informational */ + this->ike_sa->flush_queue(this->ike_sa, + this->initiator ? TASK_QUEUE_ACTIVE : TASK_QUEUE_PASSIVE); return ALREADY_DONE; } |