summaryrefslogtreecommitdiff
path: root/src/conftest/hooks/custom_proposal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conftest/hooks/custom_proposal.c')
-rw-r--r--src/conftest/hooks/custom_proposal.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/conftest/hooks/custom_proposal.c b/src/conftest/hooks/custom_proposal.c
index 38d4286c4..ee4404575 100644
--- a/src/conftest/hooks/custom_proposal.c
+++ b/src/conftest/hooks/custom_proposal.c
@@ -79,8 +79,7 @@ static linked_list_t* load_proposals(private_custom_proposal_t *this,
type = strtoul(key, &end, 10);
if (end == key || errno)
{
- type = enum_from_name(transform_type_names, key);
- if (type == -1)
+ if (!enum_from_name(transform_type_names, key, &type))
{
DBG1(DBG_CFG, "unknown transform: '%s', skipped", key);
continue;
@@ -125,7 +124,7 @@ METHOD(listener_t, message, bool,
enumerator = message->create_payload_enumerator(message);
while (enumerator->enumerate(enumerator, &payload))
{
- if (payload->get_type(payload) == SECURITY_ASSOCIATION)
+ if (payload->get_type(payload) == PLV2_SECURITY_ASSOCIATION)
{
old = (sa_payload_t*)payload;
message->remove_payload_at(message, enumerator);