From 30cf345b410dada4bb2f298d3eb1b577c8a4c59e Mon Sep 17 00:00:00 2001 From: Jonas Jelten Date: Mon, 27 Apr 2020 21:28:34 +0200 Subject: [PATCH] [mod_sofia] Fix rtp config ipv4/ipv6 index confusion --- src/mod/endpoints/mod_sofia/sofia.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 31020b3b00..32f27462e5 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -5110,13 +5110,13 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name) } if (strchr(ip, ':')) { - if (profile->rtpip_index < MAX_RTPIP) { + if (profile->rtpip_index6 < MAX_RTPIP) { profile->rtpip6[profile->rtpip_index6++] = switch_core_strdup(profile->pool, ip); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Max IPs configured for profile %s.\n", profile->name); } } else { - if (profile->rtpip_index6 < MAX_RTPIP) { + if (profile->rtpip_index < MAX_RTPIP) { profile->rtpip[profile->rtpip_index++] = switch_core_strdup(profile->pool, ip); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Max IPs configured for profile %s.\n", profile->name);