Loading codec/c++/sip_codets.cpp +51 −1 Original line number Diff line number Diff line Loading @@ -628,6 +628,8 @@ private: SIP_HEADER_ADD (CSeq, , cSeq, CSEQ_E); SIP_HEADER_ADD (Content-Length, l, contentLength, CONTENT_LENGTH_E); SIP_HEADER_ADD (Content-Type, c, contentType, CONTENT_TYPE_E); SIP_HEADER_ADD (Contact, m, contact, CONTACT_E); SIP_HEADER_ADD (To, t, toField, TO_E); { mEntries.push_back(Entry("", "", MessageHeader::id_undefinedHeader_List, "")); Entry& e = *mEntries.rbegin(); Loading Loading @@ -777,12 +779,60 @@ void Addr_Union::PreDecode (Buffer& buffer) throw (DecodeError) ); } void ContactBody::PreDecode (Buffer& buffer) throw (DecodeError) { static Regex reg_asterisk ("^[*]"); if (reg_asterisk.Match (buffer)) { SetHypChosenId (id_wildcard); SetHypFieldLength(id_wildcard, 8); } else { SetHypChosenId (id_contactAddresses); } } void ContactAddress_List::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_separator ("^" SIPREG_SWS "[,]" SIPREG_SWS); if (!buffer.GetBitsLeft()) return; if (GetSize() == 0) return; // at least one element must be present else if (reg_separator.Match(buffer)) buffer.SetPosition(buffer.GetPosition() + reg_separator.GetMatchedLength()); else SetHypSize(-2); } void ContactAddress::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_semicolon ("^;"); if (id == id_contactParams) { if(reg_semicolon.Match(buffer)) { SetHypFieldIsPresent (id, 1); } else { SetHypFieldIsPresent (id, 0); } } } void From::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_semicolon ("^;"); if (id == id_fromParams) { if(reg_semicolon.Match(buffer)) { Unsigned(8).Decode(buffer); SetHypFieldIsPresent (id, 1); } else { SetHypFieldIsPresent (id, 0); } } } void To::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_semicolon ("^;"); if (id == id_toParams) { if(reg_semicolon.Match(buffer)) { SetHypFieldIsPresent (id, 1); } else { SetHypFieldIsPresent (id, 0); Loading Loading
codec/c++/sip_codets.cpp +51 −1 Original line number Diff line number Diff line Loading @@ -628,6 +628,8 @@ private: SIP_HEADER_ADD (CSeq, , cSeq, CSEQ_E); SIP_HEADER_ADD (Content-Length, l, contentLength, CONTENT_LENGTH_E); SIP_HEADER_ADD (Content-Type, c, contentType, CONTENT_TYPE_E); SIP_HEADER_ADD (Contact, m, contact, CONTACT_E); SIP_HEADER_ADD (To, t, toField, TO_E); { mEntries.push_back(Entry("", "", MessageHeader::id_undefinedHeader_List, "")); Entry& e = *mEntries.rbegin(); Loading Loading @@ -777,12 +779,60 @@ void Addr_Union::PreDecode (Buffer& buffer) throw (DecodeError) ); } void ContactBody::PreDecode (Buffer& buffer) throw (DecodeError) { static Regex reg_asterisk ("^[*]"); if (reg_asterisk.Match (buffer)) { SetHypChosenId (id_wildcard); SetHypFieldLength(id_wildcard, 8); } else { SetHypChosenId (id_contactAddresses); } } void ContactAddress_List::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_separator ("^" SIPREG_SWS "[,]" SIPREG_SWS); if (!buffer.GetBitsLeft()) return; if (GetSize() == 0) return; // at least one element must be present else if (reg_separator.Match(buffer)) buffer.SetPosition(buffer.GetPosition() + reg_separator.GetMatchedLength()); else SetHypSize(-2); } void ContactAddress::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_semicolon ("^;"); if (id == id_contactParams) { if(reg_semicolon.Match(buffer)) { SetHypFieldIsPresent (id, 1); } else { SetHypFieldIsPresent (id, 0); } } } void From::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_semicolon ("^;"); if (id == id_fromParams) { if(reg_semicolon.Match(buffer)) { Unsigned(8).Decode(buffer); SetHypFieldIsPresent (id, 1); } else { SetHypFieldIsPresent (id, 0); } } } void To::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_semicolon ("^;"); if (id == id_toParams) { if(reg_semicolon.Match(buffer)) { SetHypFieldIsPresent (id, 1); } else { SetHypFieldIsPresent (id, 0); Loading