|
|
|
|
@ -490,9 +490,11 @@ static bool parse_sdp_line_ex(AmSdp* sdp_msg, char*& s)
|
|
|
|
|
{
|
|
|
|
|
s = is_eql_next(s);
|
|
|
|
|
next = get_next_line(s);
|
|
|
|
|
string version(s, int(next-s)-2);
|
|
|
|
|
str2i(version, sdp_msg->version);
|
|
|
|
|
DBG("parse_sdp_line_ex: found version\n");
|
|
|
|
|
if (int(next-s)-2 >= 0) {
|
|
|
|
|
string version(s, int(next-s)-2);
|
|
|
|
|
str2i(version, sdp_msg->version);
|
|
|
|
|
DBG("parse_sdp_line_ex: found version\n");
|
|
|
|
|
}
|
|
|
|
|
s = next;
|
|
|
|
|
state = SDP_DESCR;
|
|
|
|
|
break;
|
|
|
|
|
@ -510,8 +512,10 @@ static bool parse_sdp_line_ex(AmSdp* sdp_msg, char*& s)
|
|
|
|
|
DBG("parse_sdp_line_ex: found session\n");
|
|
|
|
|
s = is_eql_next(s);
|
|
|
|
|
next = get_next_line(s);
|
|
|
|
|
string sessionName(s, int(next-s)-2);
|
|
|
|
|
sdp_msg->sessionName = sessionName;
|
|
|
|
|
if (int(next-s)-2 >= 0) {
|
|
|
|
|
string sessionName(s, int(next-s)-2);
|
|
|
|
|
sdp_msg->sessionName = sessionName;
|
|
|
|
|
}
|
|
|
|
|
s = next;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -520,7 +524,9 @@ static bool parse_sdp_line_ex(AmSdp* sdp_msg, char*& s)
|
|
|
|
|
DBG("parse_sdp_line_ex: found uri\n");
|
|
|
|
|
s = is_eql_next(s);
|
|
|
|
|
next = get_next_line(s);
|
|
|
|
|
sdp_msg->uri = string(s, int(next-s)-2);
|
|
|
|
|
if (int(next-s)-2 >= 0) {
|
|
|
|
|
sdp_msg->uri = string(s, int(next-s)-2);
|
|
|
|
|
}
|
|
|
|
|
s = next;
|
|
|
|
|
} break;
|
|
|
|
|
|
|
|
|
|
@ -560,8 +566,11 @@ static bool parse_sdp_line_ex(AmSdp* sdp_msg, char*& s)
|
|
|
|
|
default:
|
|
|
|
|
{
|
|
|
|
|
next = get_next_line(s);
|
|
|
|
|
string line(s, int(next-s)-2);
|
|
|
|
|
DBG("parse_sdp_line: skipping unknown Session description %s=\n", (char*)line.c_str());
|
|
|
|
|
if (int(next-s)-2 >= 0) {
|
|
|
|
|
string line(s, int(next-s)-2);
|
|
|
|
|
DBG("parse_sdp_line: skipping unknown Session description %s=\n",
|
|
|
|
|
(char*)line.c_str());
|
|
|
|
|
}
|
|
|
|
|
s = next;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -608,9 +617,11 @@ static bool parse_sdp_line_ex(AmSdp* sdp_msg, char*& s)
|
|
|
|
|
default :
|
|
|
|
|
{
|
|
|
|
|
next = get_next_line(s);
|
|
|
|
|
string line(s, int(next-s)-2);
|
|
|
|
|
DBG("parse_sdp_line: skipping unknown Media description '%s'\n",
|
|
|
|
|
(char*)line.c_str());
|
|
|
|
|
if (int(next-s)-2 >= 0) {
|
|
|
|
|
string line(s, int(next-s)-2);
|
|
|
|
|
DBG("parse_sdp_line: skipping unknown Media description '%s'\n",
|
|
|
|
|
(char*)line.c_str());
|
|
|
|
|
}
|
|
|
|
|
s = next;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|