[Asterisk-cvs] asterisk/channels chan_sip.c,1.763,1.764

markster at lists.digium.com markster at lists.digium.com
Sat Jun 18 19:29:35 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv8225/channels

Modified Files:
	chan_sip.c 
Log Message:
Attempt to repair SIP parameter gathering brokenness


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.763
retrieving revision 1.764
diff -u -d -r1.763 -r1.764
--- chan_sip.c	18 Jun 2005 18:53:16 -0000	1.763
+++ chan_sip.c	18 Jun 2005 23:30:40 -0000	1.764
@@ -7770,7 +7770,7 @@
 	c = tmp + strlen("Digest ");
 	for (i = keys; i->key != NULL; i++)
 		i->dst[0] = '\0';	/* init all to empty strings */
-	for (; c && *(c = ast_skip_blanks(c)) ; c++) {	/* lookup for keys */
+	while (c && *(c = ast_skip_blanks(c))) {	/* lookup for keys */
 		for (i = keys; i->key != NULL; i++) {
 			char *src;
 			if (strncasecmp(c, i->key, strlen(i->key)) != 0)
@@ -7779,12 +7779,16 @@
 			c += strlen(i->key);
 			if ((*c == '\"')) {
 				src = ++c;
-				if ((c = strchr(c,'\"')))
+				if ((c = strchr(c,'\"'))) {
 					*c = '\0';
+					c++;
+				}
 			} else {
 				src = c;
-				if ((c = strchr(c,',')))
+				if ((c = strchr(c,','))) {
 					*c = '\0';
+					c++;
+				}
 			}
 			ast_copy_string(i->dst, src, i->dstlen);
 			break;




More information about the svn-commits mailing list