[Asterisk-cvs] asterisk/channels chan_sip.c,1.694,1.695

markster at lists.digium.com markster at lists.digium.com
Sun Mar 27 23:29:12 CST 2005


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

Modified Files:
	chan_sip.c 
Log Message:
Cleanup SIP method stuff a little


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.694
retrieving revision 1.695
diff -u -d -r1.694 -r1.695
--- chan_sip.c	27 Mar 2005 02:08:37 -0000	1.694
+++ chan_sip.c	28 Mar 2005 05:23:04 -0000	1.695
@@ -128,7 +128,6 @@
 #define SIP_INFO	12
 #define SIP_CANCEL	13
 #define SIP_PUBLISH	14
-#define SIP_MAX_METHODS	14
 #define SIP_RESPONSE	100
 
 const struct  cfsip_methods { 
@@ -713,7 +712,7 @@
 {
 	int i, res = 0;
 	/* Strictly speaking, SIP methods are case SENSITIVE, but we don't check */
-	for (i=1; i< SIP_MAX_METHODS && !res; i++) {
+	for (i=1;(i < (sizeof(sip_methods) / sizeof(sip_methods[0]))) && !res; i++) {
 		if (!strcasecmp(sip_methods[i].text, msg)) 
 			res = sip_methods[i].id;
 	}




More information about the svn-commits mailing list