payload: Use common prefixes for all payload type identifiers
The old identifiers did not use a proper namespace and often clashed with other defines.
This commit is contained in:
@@ -232,8 +232,8 @@ static void ike2queue(message_t *message, linked_list_t *queue,
|
||||
enumerator = message->create_payload_enumerator(message);
|
||||
while (enumerator->enumerate(enumerator, &payload))
|
||||
{
|
||||
if (payload->get_type(payload) == NOTIFY ||
|
||||
payload->get_type(payload) == NOTIFY_V1)
|
||||
if (payload->get_type(payload) == PLV2_NOTIFY ||
|
||||
payload->get_type(payload) == PLV1_NOTIFY)
|
||||
{
|
||||
notify = (notify_payload_t*)payload;
|
||||
if (notify->get_notify_type(notify) == RADIUS_ATTRIBUTE)
|
||||
|
||||
@@ -87,12 +87,12 @@ static bool build_round(private_eap_radius_xauth_t *this, cp_payload_t *cp)
|
||||
return FALSE;
|
||||
}
|
||||
cp->add_attribute(cp, configuration_attribute_create_chunk(
|
||||
CONFIGURATION_ATTRIBUTE_V1, this->round.type, chunk_empty));
|
||||
PLV1_CONFIGURATION_ATTRIBUTE, this->round.type, chunk_empty));
|
||||
|
||||
if (this->round.message && strlen(this->round.message))
|
||||
{
|
||||
cp->add_attribute(cp, configuration_attribute_create_chunk(
|
||||
CONFIGURATION_ATTRIBUTE_V1, XAUTH_MESSAGE,
|
||||
PLV1_CONFIGURATION_ATTRIBUTE, XAUTH_MESSAGE,
|
||||
chunk_from_str(this->round.message)));
|
||||
}
|
||||
return TRUE;
|
||||
@@ -103,10 +103,10 @@ METHOD(xauth_method_t, initiate, status_t,
|
||||
{
|
||||
cp_payload_t *cp;
|
||||
|
||||
cp = cp_payload_create_type(CONFIGURATION_V1, CFG_REQUEST);
|
||||
cp = cp_payload_create_type(PLV1_CONFIGURATION, CFG_REQUEST);
|
||||
/* first message always comes with username */
|
||||
cp->add_attribute(cp, configuration_attribute_create_chunk(
|
||||
CONFIGURATION_ATTRIBUTE_V1, XAUTH_USER_NAME, chunk_empty));
|
||||
PLV1_CONFIGURATION_ATTRIBUTE, XAUTH_USER_NAME, chunk_empty));
|
||||
|
||||
if (build_round(this, cp))
|
||||
{
|
||||
@@ -211,7 +211,7 @@ METHOD(xauth_method_t, process, status_t,
|
||||
{
|
||||
return verify_radius(this);
|
||||
}
|
||||
cp = cp_payload_create_type(CONFIGURATION_V1, CFG_REQUEST);
|
||||
cp = cp_payload_create_type(PLV1_CONFIGURATION, CFG_REQUEST);
|
||||
if (build_round(this, cp))
|
||||
{
|
||||
*out = cp;
|
||||
|
||||
Reference in New Issue
Block a user