Loading codec/c++/sip_codets.cpp +18 −15 Original line number Diff line number Diff line Loading @@ -798,8 +798,18 @@ void RequestLine::PostEncodeField (int field_id, Buffer& buffer) throw (EncodeEr void GenericParam::PostDecode (Buffer& buffer) throw (DecodeError) { Variable* param_list = GetParent(); if (!param_list) return; Variable* parent = param_list->GetParent(); if (!parent) return; const char* parent_type = parent->GetTypeName(); if (strcmp (parent_type, "SipUrl") == 0) { normalise_escaped_string (Get_id()); } if (IsPresent (id_paramValue)) { Loading @@ -811,21 +821,14 @@ void GenericParam::PostDecode (Buffer& buffer) throw (DecodeError) } else { const char* par_name = Get_id().GetValue(); Variable* param_list = GetParent(); if (param_list) { Variable* parent = param_list->GetParent(); if (parent) { const char* ptype = parent->GetTypeName(); //TODO: add other unescaped params if (strcmp (ptype, "ViaBody") == 0) { if (strcmp (parent_type, "ViaBody") == 0) { if ((strcmp (par_name, "branch") == 0) || (strcmp (par_name, "ttl") == 0) || (strcmp (par_name, "maddr") == 0) || (strcmp (par_name, "received") == 0)) goto skip_escape; } } } do_escape: normalise_escaped_string (value); skip_escape: ; Loading Loading
codec/c++/sip_codets.cpp +18 −15 Original line number Diff line number Diff line Loading @@ -798,8 +798,18 @@ void RequestLine::PostEncodeField (int field_id, Buffer& buffer) throw (EncodeEr void GenericParam::PostDecode (Buffer& buffer) throw (DecodeError) { Variable* param_list = GetParent(); if (!param_list) return; Variable* parent = param_list->GetParent(); if (!parent) return; const char* parent_type = parent->GetTypeName(); if (strcmp (parent_type, "SipUrl") == 0) { normalise_escaped_string (Get_id()); } if (IsPresent (id_paramValue)) { Loading @@ -811,21 +821,14 @@ void GenericParam::PostDecode (Buffer& buffer) throw (DecodeError) } else { const char* par_name = Get_id().GetValue(); Variable* param_list = GetParent(); if (param_list) { Variable* parent = param_list->GetParent(); if (parent) { const char* ptype = parent->GetTypeName(); //TODO: add other unescaped params if (strcmp (ptype, "ViaBody") == 0) { if (strcmp (parent_type, "ViaBody") == 0) { if ((strcmp (par_name, "branch") == 0) || (strcmp (par_name, "ttl") == 0) || (strcmp (par_name, "maddr") == 0) || (strcmp (par_name, "received") == 0)) goto skip_escape; } } } do_escape: normalise_escaped_string (value); skip_escape: ; Loading