[Asterisk-cvs] asterisk/channels chan_sip.c,1.556,1.557

markster at lists.digium.com markster at lists.digium.com
Thu Nov 11 10:07:38 CST 2004


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

Modified Files:
	chan_sip.c 
Log Message:
Cleanup/performance improve chan_sip slightly (bug #2823)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.556
retrieving revision 1.557
diff -u -d -r1.556 -r1.557
--- chan_sip.c	9 Nov 2004 02:38:18 -0000	1.556
+++ chan_sip.c	11 Nov 2004 15:08:57 -0000	1.557
@@ -1432,19 +1432,16 @@
 	headp=&ast->varshead;
 	AST_LIST_TRAVERSE(headp,current,entries) {
 		/* Check whether there is a VXML_URL variable */
-		if (strcasecmp(ast_var_name(current),"VXML_URL")==0)
-	        {
+		if (!vxml_url && !strcasecmp(ast_var_name(current),"VXML_URL")) {
 			vxml_url = ast_var_value(current);
-		} else
-		/* Check whether there is a ALERT_INFO variable */
-		if (strcasecmp(ast_var_name(current),"ALERT_INFO")==0)
-	        {
+		} else if (!distinctive_ring && !strcasecmp(ast_var_name(current),"ALERT_INFO")) {
+			/* Check whether there is a ALERT_INFO variable */
 			distinctive_ring = ast_var_value(current);
 		}
 #ifdef OSP_SUPPORT
-		else if (!strcasecmp(ast_var_name(current), "OSPTOKEN")) {
+		  else if (!osptoken && !strcasecmp(ast_var_name(current), "OSPTOKEN")) {
 			osptoken = ast_var_value(current);
-		} else if (!strcasecmp(ast_var_name(current), "OSPHANDLE")) {
+		} else if (!osphandle && !strcasecmp(ast_var_name(current), "OSPHANDLE")) {
 			osphandle = ast_var_value(current);
 		}
 #endif




More information about the svn-commits mailing list