From 150ebff5d4e9362a36ec98bd4b873b12ffde246e Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 3 Jun 2015 16:04:51 -0500 Subject: [PATCH] FS-7602 FS-7499 FS-7587 #comment another refactoring pass on candidate parsing and ipv4/6 parsing (part 2) --- src/switch_core_media.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index f9698841a8..df872dfa30 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -3241,6 +3241,11 @@ static switch_status_t check_ice(switch_media_handle_t *smh, switch_media_type_t } } + if (!ice_seen) { + return SWITCH_STATUS_SUCCESS; + } + + for (cid = 0; cid < 2; cid++) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(smh->session), SWITCH_LOG_DEBUG, "Searching for %s candidate.\n", cid ? "rtcp" : "rtp"); @@ -3419,7 +3424,6 @@ static switch_status_t check_ice(switch_media_handle_t *smh, switch_media_type_t } - return ice_seen ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_BREAK; } #ifdef _MSC_VER @@ -4567,7 +4571,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s } if (switch_core_media_set_video_codec(session, 0) == SWITCH_STATUS_SUCCESS) { - if (check_ice(smh, SWITCH_MEDIA_TYPE_VIDEO, sdp, m) != SWITCH_STATUS_SUCCESS) { + if (check_ice(smh, SWITCH_MEDIA_TYPE_VIDEO, sdp, m) == SWITCH_STATUS_FALSE) { vmatch = 0; } }