]> sjero.net Git - linphone/commitdiff
Use ICE selected pairs instead of nominated valid pairs.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Wed, 8 Aug 2012 09:43:51 +0000 (11:43 +0200)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Wed, 8 Aug 2012 09:43:51 +0000 (11:43 +0200)
coreapi/linphonecall.c
coreapi/misc.c

index f90f970369e96297e710c01fff5512aef1db48f0..62f296745c60ba3b40234239ea6c164f3afe9c34 100644 (file)
@@ -1739,6 +1739,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
                switch (ice_session_state(call->ice_session)) {
                        case IS_Completed:
                                if (ice_session_role(call->ice_session) == IR_Controlling) {
+                                       ice_session_select_candidates(call->ice_session);
                                        linphone_core_update_call(call->core, call, &call->current_params);
                                }
                                break;
index a43451036258ca8dde0f407193e6b03eecbbc0c5..90380beab3ebdb4b308182c3a40b455cd2dd2f8f 100644 (file)
@@ -614,7 +614,7 @@ void linphone_core_update_local_media_description_from_ice(SalMediaDescription *
 
        if (session_state == IS_Completed) {
                desc->ice_completed = TRUE;
-               ice_check_list_nominated_valid_local_candidate(ice_session_check_list(session, 0), &rtp_addr, NULL, NULL, NULL);
+               ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, 0), &rtp_addr, NULL, NULL, NULL);
                strncpy(desc->addr, rtp_addr, sizeof(desc->addr));
        }
        else {
@@ -629,7 +629,7 @@ void linphone_core_update_local_media_description_from_ice(SalMediaDescription *
                if (cl == NULL) continue;
                if (cl->state == ICL_Completed) {
                        stream->ice_completed = TRUE;
-                       ice_check_list_nominated_valid_local_candidate(ice_session_check_list(session, i), &rtp_addr, &stream->rtp_port, &rtcp_addr, &stream->rtcp_port);
+                       ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, i), &rtp_addr, &stream->rtp_port, &rtcp_addr, &stream->rtcp_port);
                        strncpy(stream->rtp_addr, rtp_addr, sizeof(stream->rtp_addr));
                        strncpy(stream->rtcp_addr, rtcp_addr, sizeof(stream->rtcp_addr));
                } else {
@@ -678,7 +678,7 @@ void linphone_core_update_local_media_description_from_ice(SalMediaDescription *
                if ((cl->state == ICL_Completed) && (ice_session_role(session) == IR_Controlling)) {
                        int rtp_port, rtcp_port;
                        memset(stream->ice_remote_candidates, 0, sizeof(stream->ice_remote_candidates));
-                       ice_check_list_nominated_valid_remote_candidate(cl, &rtp_addr, &rtp_port, &rtcp_addr, &rtcp_port);
+                       ice_check_list_selected_valid_remote_candidate(cl, &rtp_addr, &rtp_port, &rtcp_addr, &rtcp_port);
                        strncpy(stream->ice_remote_candidates[0].addr, rtp_addr, sizeof(stream->ice_remote_candidates[0].addr));
                        stream->ice_remote_candidates[0].port = rtp_port;
                        strncpy(stream->ice_remote_candidates[1].addr, rtcp_addr, sizeof(stream->ice_remote_candidates[1].addr));