projects
/
asterisk/asterisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup SIP method stuff a little
[asterisk/asterisk.git]
/
channels
/
chan_sip.c
diff --git
a/channels/chan_sip.c
b/channels/chan_sip.c
index
e2d54d3
..
5f17c1b
100755
(executable)
--- 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_INFO 12
#define SIP_CANCEL 13
#define SIP_PUBLISH 14
-#define SIP_MAX_METHODS 14
#define SIP_RESPONSE 100
const struct cfsip_methods {
#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 */
{
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;
}
if (!strcasecmp(sip_methods[i].text, msg))
res = sip_methods[i].id;
}