aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-28 05:23:04 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-28 05:23:04 +0000
commit35778b9a841a1bd4cef8e532ffa39138b3b2f965 (patch)
tree8d6656c530aace0114bf67d84b3dee78b8f4f985 /channels
parent5a29e6fa7220aea601944c3829878f45cf94550e (diff)
Cleanup SIP method stuff a little
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5284 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e2d54d364..5f17c1b9e 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;
}