Commit 8021d4b4 authored by urbant's avatar urbant
Browse files

decoding support for RFC 3325

parent ea1b4303
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -753,6 +753,8 @@ private:
		SIP_HEADER_ADD (Subscription-State,		,	subscriptionState,	SUBSCRIPTION_STATE_E);
		SIP_HEADER_ADD (P-Media-Authorization,	,	pMediaAuthorization,	P_MEDIA_AUTHORIZATION_E);
		SIP_HEADER_ADD (Privacy,	,	privacy,	PRIVACY_E);
		SIP_HEADER_ADD (P-Asserted-Identity,	,	pAssertedID,	P_ASSERTED_ID_E);
		
		{
			mEntries.push_back(Entry("", "", MessageHeader::id_undefinedHeader_List, ""));
			Entry& e = *mEntries.rbegin();
@@ -820,6 +822,7 @@ void MessageHeader::PreDecodeField (Buffer& buffer) throw (DecodeError)
			case id_warning:
			case id_allowEvents:
			case id_pMediaAuthorization:
			case id_pAssertedID:
			case id_undefinedHeader_List:
				// these fields can appear multiple times
				break;
@@ -2131,4 +2134,18 @@ void PrivacyValue_List::PostDecodeField (int id, Buffer& buffer) throw (DecodeEr
		SetHypSize (-2);
}

void PAssertedIDValue_List::PreDecode (Buffer& buffer) throw (DecodeError)
{
	SetHypSize (GetSize() + 1);
	SetHypAppend (1);
}

void PAssertedIDValue_List::PostDecodeField (int id, Buffer& buffer) throw (DecodeError)
{
	if (detect_comma (buffer))
		SetHypSize (GetSize() + 1);
	else
		SetHypSize (-2);
}

}} // namespaces