aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/sa/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/sa/tasks')
-rw-r--r--src/libcharon/sa/tasks/informational.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/libcharon/sa/tasks/informational.c b/src/libcharon/sa/tasks/informational.c
index c1a30e4ee..c2c6aa5fa 100644
--- a/src/libcharon/sa/tasks/informational.c
+++ b/src/libcharon/sa/tasks/informational.c
@@ -94,15 +94,19 @@ METHOD(task_t, process_r, status_t,
}
continue;
case DELETE_V1:
- delete = (delete_payload_t*)payload;
- if (delete->get_protocol_id(delete) == PROTO_IKE)
+ if (!this->del)
{
- this->del = (task_t*)ike_delete_create(this->ike_sa, FALSE);
- }
- else
- {
- this->del = (task_t*)child_delete_create(this->ike_sa,
- PROTO_NONE, 0);
+ delete = (delete_payload_t*)payload;
+ if (delete->get_protocol_id(delete) == PROTO_IKE)
+ {
+ this->del = (task_t*)ike_delete_create(this->ike_sa,
+ FALSE);
+ }
+ else
+ {
+ this->del = (task_t*)child_delete_create(this->ike_sa,
+ PROTO_NONE, 0);
+ }
}
break;
default:
@@ -112,7 +116,7 @@ METHOD(task_t, process_r, status_t,
}
enumerator->destroy(enumerator);
- if (status == SUCCESS)
+ if (this->del && status == SUCCESS)
{
return this->del->process(this->del, message);
}