]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7602 FS-7499 FS-7587 #comment another refactoring pass on candidate parsing and...
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 3 Jun 2015 21:04:51 +0000 (16:04 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 3 Jun 2015 21:04:51 +0000 (16:04 -0500)
src/switch_core_media.c

index f9698841a8f251a568af1b7b93a994ebc31be57f..df872dfa30eaa7b300cbc88ac4c7f9965b5facc2 100644 (file)
@@ -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;
                                        }
                                }