[asterisk-commits] file: trunk r370111 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 16 10:08:57 CDT 2012


Author: file
Date: Mon Jul 16 10:08:53 2012
New Revision: 370111

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370111
Log:
Fix a bug exposed by the testsuite where text streams would no longer be parsed correctly.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=370111&r1=370110&r2=370111
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jul 16 10:08:53 2012
@@ -9602,8 +9602,8 @@
 		}
 		/* 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" */




More information about the asterisk-commits mailing list