diff options
author | Joshua Colp <jcolp@digium.com> | 2012-07-16 15:08:53 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2012-07-16 15:08:53 +0000 |
commit | f234eae9eee15cc13af3fddebe11d98f9b776f5f (patch) | |
tree | 743bfdc57ff1b9575021c60170db2a8e27651126 /channels | |
parent | 25e721ee9b849671b37dfa3db7b9f5a32508eb0c (diff) |
Fix a bug exposed by the testsuite where text streams would no longer be parsed correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index aeadeef0b..e4cdb4c2a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9602,8 +9602,8 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action } /* Check for 'text' media offer */ else if (strncmp(m, "text ", 5) == 0) { - if ((sscanf(m, "text %30u/%30u RTP/%s %n", &x, &numberofports, protocol, &len) == 2 && len > 0) || - (sscanf(m, "text %30u RTP/%s %n", &x, protocol, &len) == 1 && len > 0)) { + if ((sscanf(m, "text %30u/%30u RTP/%5s %n", &x, &numberofports, protocol, &len) == 3 && len > 0) || + (sscanf(m, "text %30u RTP/%5s %n", &x, protocol, &len) == 2 && len > 0)) { codecs = m + len; /* produce zero-port m-line since it may be needed later * length is "m=text 0 RTP/" + protocol + " " + codecs + "\0" */ |