From 4fbb1a57c4fbf845fa49fe1f0c51acc83ea11d3a Mon Sep 17 00:00:00 2001 From: Mark Spencer <markster@digium.com> Date: Mon, 28 Mar 2005 05:23:04 +0000 Subject: [PATCH] Cleanup SIP method stuff a little git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5284 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e2d54d364a..5f17c1b9e5 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -128,7 +128,6 @@ static const char notify_config[] = "sip_notify.conf"; #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 find_sip_method(char *msg) { 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; } -- GitLab