From 14361c09074f43ca87484d87212c5f24055a9769 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 12 Oct 2010 09:32:15 -0500 Subject: [PATCH] FS-620 --- src/mod/endpoints/mod_sofia/sofia_glue.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 7464a42825..cb8b257e58 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -1425,9 +1425,12 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt) } if (tech_pvt->adv_sdp_audio_ip && !strncmp("c=IN IP", p, 7)) { - strncpy(q, p, 9); - p += 9; - q += 9; + strncpy(q, p, 7); + p += 7; + q += 7; + strncpy(q, strchr(tech_pvt->adv_sdp_audio_ip, ':') ? "6 " : "4 ", 2); + p +=2; + q +=2; strncpy(q, tech_pvt->adv_sdp_audio_ip, strlen(tech_pvt->adv_sdp_audio_ip)); q += strlen(tech_pvt->adv_sdp_audio_ip);