From 4021b5ce14c704c141f912500cb78708c742c6a8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 5 Feb 2014 00:31:10 +0500 Subject: [PATCH] try to avoid compiler optimization snafu --- src/mod/endpoints/mod_sofia/sofia.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 21b2599592..f8542f3ae2 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -3480,14 +3480,15 @@ static void config_sofia_profile_urls(sofia_profile_t * profile) } if (profile->bind_params) { - char *bindurl = profile->bindurl; + char *bindurl; if (!switch_stristr("transport=", profile->bind_params)) { profile->bind_params = switch_core_sprintf(profile->pool, "%s;transport=udp,tcp", profile->bind_params); } - profile->bindurl = switch_core_sprintf(profile->pool, "%s;%s", bindurl, profile->bind_params); + bindurl = switch_core_sprintf(profile->pool, "%s;%s", profile->bindurl, profile->bind_params); + profile->bindurl = bindurl; } else { - char *bindurl = profile->bindurl; - profile->bindurl = switch_core_sprintf(profile->pool, "%s;transport=udp,tcp", bindurl); + char *bindurl = switch_core_sprintf(profile->pool, "%s;transport=udp,tcp", profile->bindurl); + profile->bindurl = bindurl; }