Fix the ordering of the sscanfs for SDP parsing (bug #AT&T)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
053326ac85
commit
0b265779b2
|
@ -3400,8 +3400,8 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
|
||||||
ast_set_flag(p, SIP_NOVIDEO);
|
ast_set_flag(p, SIP_NOVIDEO);
|
||||||
while ((m = get_sdp_iterate(&iterator, req, "m"))[0] != '\0') {
|
while ((m = get_sdp_iterate(&iterator, req, "m"))[0] != '\0') {
|
||||||
int found = 0;
|
int found = 0;
|
||||||
if ((sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1) ||
|
if ((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &y, &len) == 2) ||
|
||||||
(sscanf(m, "audio %d/%d RTP/AVP %n", &x, &y, &len) == 2)) {
|
(sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1)) {
|
||||||
found = 1;
|
found = 1;
|
||||||
portno = x;
|
portno = x;
|
||||||
/* Scan through the RTP payload types specified in a "m=" line: */
|
/* Scan through the RTP payload types specified in a "m=" line: */
|
||||||
|
|
Loading…
Reference in New Issue