aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 18:55:57 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 18:55:57 +0000
commit0c2cd0d5d58c5825d288a4e421fe7f0594801b57 (patch)
tree8f70e7cffb95e18a20dc453606266de277f36da6
parent7cbd9fd88c4c120063f7c8e3b29aecbe75388963 (diff)
Merged revisions 59916 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r59916 | russell | 2007-04-03 13:43:54 -0500 (Tue, 03 Apr 2007) | 3 lines 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.4@59936 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ff95e2d82..bdffb8b26 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15851,7 +15851,8 @@ static struct sip_user *build_user(const char *name, struct ast_variable *v, int
user->maxcallbitrate = atoi(v->value);
if (user->maxcallbitrate < 0)
user->maxcallbitrate = default_maxcallbitrate;
- }
+ } 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);
}
ast_copy_flags(&user->flags[0], &userflags[0], mask[0].flags);
ast_copy_flags(&user->flags[1], &userflags[1], mask[1].flags);
@@ -16148,7 +16149,8 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
peer->maxcallbitrate = atoi(v->value);
if (peer->maxcallbitrate < 0)
peer->maxcallbitrate = default_maxcallbitrate;
- }
+ } 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);
}
if (!ast_test_flag(&global_flags[1], SIP_PAGE2_IGNOREREGEXPIRE) && ast_test_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC) && realtime) {
time_t nowtime = time(NULL);
@@ -16532,7 +16534,8 @@ static int reload_config(enum channelreloadreason reason)
default_maxcallbitrate = DEFAULT_MAX_CALL_BITRATE;
} else if (!strcasecmp(v->name, "matchexterniplocally")) {
global_matchexterniplocally = ast_true(v->value);
- }
+ } else
+ ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
}
if (!allow_external_domains && AST_LIST_EMPTY(&domain_list)) {
@@ -16545,6 +16548,8 @@ static int reload_config(enum channelreloadreason reason)
/* 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);
}
ucfg = ast_config_load("users.conf");