]> sjero.net Git - linphone/blobdiff - coreapi/linphonecall.c
Select ICE candidates on completion even for the controlled agent.
[linphone] / coreapi / linphonecall.c
index 7f11028ab28b18a4613757115ae05d43d402c3f8..d3212a9f6236219cfc5e6044620a21c81eb4dcc1 100644 (file)
@@ -1767,16 +1767,16 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
        if (evt == ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED) {
                switch (ice_session_state(call->ice_session)) {
                        case IS_Completed:
+                               ice_session_select_candidates(call->ice_session);
                                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;
                        case IS_Failed:
                                if (ice_session_has_completed_check_list(call->ice_session) == TRUE) {
+                                       ice_session_select_candidates(call->ice_session);
                                        if (ice_session_role(call->ice_session) == IR_Controlling) {
                                                /* At least one ICE session has succeeded, so perform a call update. */
-                                               ice_session_select_candidates(call->ice_session);
                                                linphone_core_update_call(call->core, call, &call->current_params);
                                        }
                                }