Loading codec/c++/sip_codets.cpp +21 −3 Original line number Diff line number Diff line Loading @@ -760,7 +760,25 @@ void MessageHeader::PreDecodeField (Buffer& buffer) throw (DecodeError) if (reg_header_name.Match (buffer)) { int id = SipHeaderMap::GetByName(reg_header_name.GetMatchedString (1)).mIdMessageHeader; const SipHeaderMap::Entry& hdr = SipHeaderMap::GetByName(reg_header_name.GetMatchedString (1)); int id = hdr.mIdMessageHeader; // check that this field is not duplicated if (IsPresent(id)) { switch (id) { case id_accept: case id_contact: case id_via: case id_undefinedHeader_List: // these fields can appear multiple times break; default: DecodeError e (this); e.Msg() << "Duplicated field in the message: " << hdr.mName << std::endl; throw (e); } } SetHypNextField (id); } else { Loading Loading @@ -1593,7 +1611,7 @@ void ViaBody::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) void ViaBody_List::PreDecode (Buffer& buffer) throw (DecodeError) { // we assume that we are decoding one field at onece // we assume that we are decoding one field at once // multiple fields are handled by successively decoding // the via field several times in MessageHeader SetHypSize (GetSize() + 1); Loading @@ -1613,7 +1631,7 @@ void ViaBody_List::PostDecodeField (int id, Buffer& buffer) throw (DecodeError) void UndefinedHeader_List::PreDecode (Buffer& buffer) throw (DecodeError) { // we assume that we are decoding one field at onece // we assume that we are decoding one field at once // multiple fields are handled by successively decoding // the via field several times in MessageHeader SetHypSize (GetSize() + 1); Loading Loading
codec/c++/sip_codets.cpp +21 −3 Original line number Diff line number Diff line Loading @@ -760,7 +760,25 @@ void MessageHeader::PreDecodeField (Buffer& buffer) throw (DecodeError) if (reg_header_name.Match (buffer)) { int id = SipHeaderMap::GetByName(reg_header_name.GetMatchedString (1)).mIdMessageHeader; const SipHeaderMap::Entry& hdr = SipHeaderMap::GetByName(reg_header_name.GetMatchedString (1)); int id = hdr.mIdMessageHeader; // check that this field is not duplicated if (IsPresent(id)) { switch (id) { case id_accept: case id_contact: case id_via: case id_undefinedHeader_List: // these fields can appear multiple times break; default: DecodeError e (this); e.Msg() << "Duplicated field in the message: " << hdr.mName << std::endl; throw (e); } } SetHypNextField (id); } else { Loading Loading @@ -1593,7 +1611,7 @@ void ViaBody::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) void ViaBody_List::PreDecode (Buffer& buffer) throw (DecodeError) { // we assume that we are decoding one field at onece // we assume that we are decoding one field at once // multiple fields are handled by successively decoding // the via field several times in MessageHeader SetHypSize (GetSize() + 1); Loading @@ -1613,7 +1631,7 @@ void ViaBody_List::PostDecodeField (int id, Buffer& buffer) throw (DecodeError) void UndefinedHeader_List::PreDecode (Buffer& buffer) throw (DecodeError) { // we assume that we are decoding one field at onece // we assume that we are decoding one field at once // multiple fields are handled by successively decoding // the via field several times in MessageHeader SetHypSize (GetSize() + 1); Loading