]> sjero.net Git - linphone/commitdiff
Define ICE session role explicitly.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Wed, 18 Jul 2012 10:29:05 +0000 (12:29 +0200)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Thu, 19 Jul 2012 13:03:27 +0000 (15:03 +0200)
coreapi/misc.c

index 6fa68e6dc404c178e1548ca7aba801cda80fadde..fd3a8716eda2fd28c4bd790741abf9051a6bd0c4 100644 (file)
@@ -614,6 +614,11 @@ void linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call)
                ms_error("Fail to get local ip");
                return;
        }
+       if (call->dir == LinphoneCallOutgoing) {
+               ice_session_set_role(call->ice_session, IR_Controlling);
+       } else {
+               ice_session_set_role(call->ice_session, IR_Controlled);
+       }
        audio_ice_bases[0] = ice_add_local_candidate(call->localdesc->streams[0].ice_check_list, "host", local_addr, call->audio_port, 1, NULL);
        audio_ice_bases[1] = ice_add_local_candidate(call->localdesc->streams[0].ice_check_list, "host", local_addr, call->audio_port + 1, 2, NULL);
        if (call->params.has_video) {