Loading codec/c++/sip_codets.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -205,19 +205,20 @@ void UserInfo::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) void HostPort::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_host1 ("^" SIPREG_HOST, REG_ICASE); static Regex reg_host2 ("^" SIPREG_HOST ":", REG_ICASE); static Regex reg_host ("^" SIPREG_HOST, REG_ICASE); static Regex reg_colon ("^:"); switch (id) { case id_host: // host is always present SetHypFieldIsPresent(id, 1); if (reg_host2.Match(buffer)){ SetHypFieldLength(id, reg_host2.GetMatchedLength() - 8); } else { reg_host1.AssertMatch(buffer, this); } reg_host.AssertMatch(buffer, this); SetHypFieldLength(id, reg_host.GetMatchedLength()); break; case id_portField: if(buffer.GetBitsLeft()) { if(reg_colon.Match (buffer)) { buffer.SetPosition(buffer.GetPosition() + 8); SetHypFieldIsPresent (id, 1); Get_portField().SetFormat(Integer::AsciiDecimal); Loading Loading
codec/c++/sip_codets.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -205,19 +205,20 @@ void UserInfo::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) void HostPort::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_host1 ("^" SIPREG_HOST, REG_ICASE); static Regex reg_host2 ("^" SIPREG_HOST ":", REG_ICASE); static Regex reg_host ("^" SIPREG_HOST, REG_ICASE); static Regex reg_colon ("^:"); switch (id) { case id_host: // host is always present SetHypFieldIsPresent(id, 1); if (reg_host2.Match(buffer)){ SetHypFieldLength(id, reg_host2.GetMatchedLength() - 8); } else { reg_host1.AssertMatch(buffer, this); } reg_host.AssertMatch(buffer, this); SetHypFieldLength(id, reg_host.GetMatchedLength()); break; case id_portField: if(buffer.GetBitsLeft()) { if(reg_colon.Match (buffer)) { buffer.SetPosition(buffer.GetPosition() + 8); SetHypFieldIsPresent (id, 1); Get_portField().SetFormat(Integer::AsciiDecimal); Loading