mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix sip message parse error
This commit is contained in:
parent
7826c743e4
commit
95b869245b
3 changed files with 43 additions and 13 deletions
|
@ -441,6 +441,10 @@ srs_error_t SrsGb28181SipService::on_udp_sip(string peer_ip, int peer_port,
|
|||
|
||||
if (req->is_register()) {
|
||||
std::vector<std::string> serial = srs_string_split(srs_string_replace(req->uri,"sip:", ""), "@");
|
||||
if (serial.empty()){
|
||||
return srs_error_new(ERROR_GB28181_SIP_PRASE_FAILED, "register string split");
|
||||
}
|
||||
|
||||
if (serial.at(0) != config->sip_serial){
|
||||
srs_warn("gb28181: client:%s request serial and server serial inconformity(%s:%s)",
|
||||
req->sip_auth_id.c_str(), serial.at(0).c_str(), config->sip_serial.c_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue