diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-03 18:43:54 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-03 18:43:54 +0000 |
commit | aeacb7e316f5a5e698e11f599ceba8f6a3eb2338 (patch) | |
tree | f8d0371a661af824383814177dba77b387e1520e /channels | |
parent | 0eab41e3fe17be10a6e1e38dc2eeefdf5ebd68dd (diff) |
Make chan_sip report when it encounters an unknown option.
(issue #9440, reported by nightcrawler)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@59916 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c79e7ab65..2f5c9cb11 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12343,10 +12343,8 @@ static struct sip_user *build_user(const char *name, struct ast_variable *v, int user->callingpres = ast_parse_caller_presentation(v->value); if (user->callingpres == -1) user->callingpres = atoi(v->value); - } - /*else if (strcasecmp(v->name,"type")) - * ast_log(LOG_WARNING, "Ignoring %s\n", v->name); - */ + } else if (strcasecmp(v->name, "type")) + ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno); v = v->next; } ast_copy_flags(user, &userflags, mask.flags); @@ -12629,11 +12627,9 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of sip.conf\n", peer->name, v->lineno); peer->maxms = 0; } - } - /* else if (strcasecmp(v->name,"type")) - * ast_log(LOG_WARNING, "Ignoring %s\n", v->name); - */ - v=v->next; + } else if (strcasecmp(v->name, "type")) + ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno); + v = v->next; } if (!ast_test_flag((&global_flags_page2), SIP_PAGE2_IGNOREREGEXPIRE) && ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC) && realtime) { time_t nowtime; @@ -12928,10 +12924,8 @@ static int reload_config(void) } } else if (!strcasecmp(v->name, "callevents")) { callevents = ast_true(v->value); - } - /* else if (strcasecmp(v->name,"type")) - * ast_log(LOG_WARNING, "Ignoring %s\n", v->name); - */ + } else + ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno); v = v->next; } @@ -12946,7 +12940,8 @@ static int reload_config(void) /* Format for authentication is auth = username:password@realm */ if (!strcasecmp(v->name, "auth")) { authl = add_realm_authentication(authl, v->value, v->lineno); - } + } else + ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno); v = v->next; } |