From 54d47599e9201c5b88cb38e616d8455774589768 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 17 Apr 2013 17:48:55 -0500 Subject: [PATCH] FS-5318 update --- src/mod/endpoints/mod_sofia/sofia.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index ed171ddb28..9b88c4e5fb 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -4479,16 +4479,18 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name) if (switch_true(val)) { sofia_set_pflag(profile, PFLAG_TLS); if (profile->tls_bind_params) { - profile->tls_bind_params = switch_core_sprintf(profile->pool, "%s;transport=tls", profile->tls_bind_params); + if (!switch_stristr("transport=tls", profile->tls_bind_params)) { + profile->tls_bind_params = switch_core_sprintf(profile->pool, "%s;transport=tls", profile->tls_bind_params); + } } else { profile->tls_bind_params = switch_core_strdup(profile->pool, "transport=tls"); } } } else if (!strcasecmp(var, "tls-bind-params")) { if (switch_stristr("transport=tls", val)) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Transport is already set, not adding another one.\n"); - } else { profile->tls_bind_params = switch_core_strdup(profile->pool, val); + } else { + profile->tls_bind_params = switch_core_sprintf(profile->pool, "%s;transport=tls", val); } } else if (!strcasecmp(var, "tls-only")) { profile->tls_only = switch_true(val);