moved attribute_manager to libstrongswan

This commit is contained in:
Andreas Steffen
2009-10-13 13:46:27 +02:00
parent a2b50c5d60
commit 930443afff
31 changed files with 181 additions and 125 deletions
+5 -5
View File
@@ -1848,8 +1848,8 @@ static void add_configuration_attribute(private_ike_sa_t *this,
attribute_entry_t *entry;
attribute_handler_t *handler;
handler = charon->attributes->handle(charon->attributes,
&this->public, type, data);
handler = lib->attributes->handle(lib->attributes, this->other_id,
type, data);
if (handler)
{
entry = malloc_thing(attribute_entry_t);
@@ -1962,8 +1962,8 @@ static void destroy(private_ike_sa_t *this)
while (this->attributes->remove_last(this->attributes,
(void**)&entry) == SUCCESS)
{
charon->attributes->release(charon->attributes, entry->handler,
&this->public, entry->type, entry->data);
lib->attributes->release(lib->attributes, entry->handler,
this->other_id, entry->type, entry->data);
free(entry->data.ptr);
free(entry);
}
@@ -1987,7 +1987,7 @@ static void destroy(private_ike_sa_t *this)
{
if (this->peer_cfg && this->peer_cfg->get_pool(this->peer_cfg))
{
charon->attributes->release_address(charon->attributes,
lib->attributes->release_address(lib->attributes,
this->peer_cfg->get_pool(this->peer_cfg),
this->other_virtual_ip, this->other_id);
}
+3 -3
View File
@@ -258,7 +258,7 @@ static status_t build_r(private_ike_config_t *this, message_t *message)
DBG1(DBG_IKE, "peer requested virtual IP %H", this->virtual_ip);
if (config->get_pool(config))
{
vip = charon->attributes->acquire_address(charon->attributes,
vip = lib->attributes->acquire_address(lib->attributes,
config->get_pool(config),
this->ike_sa->get_other_id(this->ike_sa),
this->virtual_ip);
@@ -281,8 +281,8 @@ static status_t build_r(private_ike_config_t *this, message_t *message)
vip->destroy(vip);
/* if we add an IP, we also look for other attributes */
enumerator = charon->attributes->create_attribute_enumerator(
charon->attributes, this->ike_sa->get_other_id(this->ike_sa));
enumerator = lib->attributes->create_attribute_enumerator(
lib->attributes, this->ike_sa->get_other_id(this->ike_sa));
while (enumerator->enumerate(enumerator, &type, &value))
{
ca = configuration_attribute_create();