aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/payloads/transform_substructure.c
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-14 17:24:18 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-14 17:24:18 +0000
commita14dffd1cc28761947f6847f784d54b0f5db2efc (patch)
tree0ac2349714eddbc23e3897912933f3dd5ab33fa9 /Source/charon/payloads/transform_substructure.c
parentbcf0c3afd486717f21695cee8e6c557fae161c1d (diff)
downloadstrongswan-a14dffd1cc28761947f6847f784d54b0f5db2efc.tar.bz2
strongswan-a14dffd1cc28761947f6847f784d54b0f5db2efc.tar.xz
- proposal_substructure written and tested
Diffstat (limited to 'Source/charon/payloads/transform_substructure.c')
-rw-r--r--Source/charon/payloads/transform_substructure.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/charon/payloads/transform_substructure.c b/Source/charon/payloads/transform_substructure.c
index b8574e731..995f96ec7 100644
--- a/Source/charon/payloads/transform_substructure.c
+++ b/Source/charon/payloads/transform_substructure.c
@@ -187,9 +187,10 @@ static status_t create_transform_attribute_iterator (private_transform_substruct
*/
static status_t add_transform_attribute (private_transform_substructure_t *this,transform_attribute_t *attribute)
{
- return (this->attributes->insert_last(this->attributes,(void *) attribute));
+ status_t status;
+ status = this->attributes->insert_last(this->attributes,(void *) attribute);
this->compute_length(this);
- return SUCCESS;
+ return status;
}
/**
@@ -198,7 +199,7 @@ static status_t add_transform_attribute (private_transform_substructure_t *this,
*/
static status_t set_is_last_transform (private_transform_substructure_t *this, bool is_last)
{
- this->next_payload = (is_last) ? 0 : TRANSFORM_TYPE_VALUE;
+ this->next_payload = (is_last) ? 0: TRANSFORM_TYPE_VALUE;
return SUCCESS;
}
@@ -269,6 +270,7 @@ static status_t compute_length (private_transform_substructure_t *this)
iterator->current(iterator,(void **) &current_attribute);
length += current_attribute->get_length(current_attribute);
}
+ iterator->destroy(iterator);
return SUCCESS;
}