attribute-manager: Pass full IKE_SA to handler methods

This commit is contained in:
Martin Willi
2015-02-20 13:34:56 +01:00
parent a16058a491
commit a12f357b40
5 changed files with 28 additions and 23 deletions
+1 -1
View File
@@ -2347,7 +2347,7 @@ METHOD(ike_sa_t, destroy, void,
if (entry.handler)
{
charon->attributes->release(charon->attributes, entry.handler,
this->other_id, entry.type, entry.data);
&this->public, entry.type, entry.data);
}
free(entry.data.ptr);
}
+2 -4
View File
@@ -136,8 +136,7 @@ static void handle_attribute(private_mode_config_t *this,
/* and pass it to the handle function */
handler = charon->attributes->handle(charon->attributes,
this->ike_sa->get_other_id(this->ike_sa), handler,
ca->get_type(ca), ca->get_chunk(ca));
this->ike_sa, handler, ca->get_type(ca), ca->get_chunk(ca));
this->ike_sa->add_configuration_attribute(this->ike_sa,
handler, ca->get_type(ca), ca->get_chunk(ca));
}
@@ -326,8 +325,7 @@ static status_t build_request(private_mode_config_t *this, message_t *message)
}
enumerator = charon->attributes->create_initiator_enumerator(
charon->attributes,
this->ike_sa->get_other_id(this->ike_sa), vips);
charon->attributes, this->ike_sa, vips);
while (enumerator->enumerate(enumerator, &handler, &type, &data))
{
add_attribute(this, cp, type, data, handler);
+2 -4
View File
@@ -127,8 +127,7 @@ static void handle_attribute(private_ike_config_t *this,
/* and pass it to the handle function */
handler = charon->attributes->handle(charon->attributes,
this->ike_sa->get_other_id(this->ike_sa), handler,
ca->get_type(ca), ca->get_chunk(ca));
this->ike_sa, handler, ca->get_type(ca), ca->get_chunk(ca));
this->ike_sa->add_configuration_attribute(this->ike_sa,
handler, ca->get_type(ca), ca->get_chunk(ca));
}
@@ -274,8 +273,7 @@ METHOD(task_t, build_i, status_t,
}
enumerator = charon->attributes->create_initiator_enumerator(
charon->attributes,
this->ike_sa->get_other_id(this->ike_sa), vips);
charon->attributes, this->ike_sa, vips);
while (enumerator->enumerate(enumerator, &handler, &type, &data))
{
configuration_attribute_t *ca;