aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-30 18:17:36 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-30 18:17:36 +0000
commit99a2a63a164b781868cbb38ab8b50f596b0183d3 (patch)
treece75bd051ef0ca61cde8e221483a620bb0f2fe84 /channels
parent9d37c0ef15ff55f58882606f697d961d75ea5ed3 (diff)
deprecate insecure=very and insecure=yes, since we have more explicit versions available now
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16548 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ff0ce2250..a5c67cfd1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11959,6 +11959,8 @@ static struct ast_channel *sip_request_call(const char *type, int format, void *
static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask, struct ast_variable *v)
{
int res = 0;
+ static int dep_insecure_very = 0;
+ static int dep_insecure_yes = 0;
if (!strcasecmp(v->name, "trustrpid")) {
ast_set_flag(&mask[0], SIP_TRUSTRPID);
@@ -12008,10 +12010,20 @@ static int handle_common_options(struct ast_flags *flags, struct ast_flags *mask
} else if (!strcasecmp(v->name, "insecure")) {
ast_set_flag(&mask[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
ast_clear_flag(&flags[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
- if (!strcasecmp(v->value, "very"))
+ if (!strcasecmp(v->value, "very")) {
ast_set_flag(&flags[0], SIP_INSECURE_PORT | SIP_INSECURE_INVITE);
- else if (ast_true(v->value))
+ if (!dep_insecure_very) {
+ ast_log(LOG_WARNING, "insecure=very at line %d is deprecated; use insecure=port,invite instead\n", v->lineno);
+ dep_insecure_very = 1;
+ }
+ }
+ else if (ast_true(v->value)) {
ast_set_flag(&flags[0], SIP_INSECURE_PORT);
+ if (!dep_insecure_yes) {
+ ast_log(LOG_WARNING, "insecure=%s at line %d is deprecated; use insecure=port instead\n", v->value, v->lineno);
+ dep_insecure_yes = 1;
+ }
+ }
else if (!ast_false(v->value)) {
char buf[64];
char *word, *next;