mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Check for ICE mismatch and add the ice-mismatch attribute in the SDP if there is a mismatch.
This commit is contained in:
parent
682e19e665
commit
72360e58a5
1 changed files with 5 additions and 0 deletions
|
|
@ -250,6 +250,10 @@ static void add_ice_candidates(sdp_message_t *msg, int lineno, const IceCheckLis
|
|||
const IceCandidate *candidate;
|
||||
int i;
|
||||
|
||||
if ((ice_check_list_state(ice_cl) == ICL_Failed) && ice_check_list_is_mismatch(ice_cl)) {
|
||||
sdp_message_a_attribute_add(msg, lineno, osip_strdup("ice-mismatch"), NULL);
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < ms_list_size(ice_cl->local_candidates); i++) {
|
||||
candidate = ms_list_nth_data(ice_cl->local_candidates, i);
|
||||
switch (ice_check_list_state(ice_cl)) {
|
||||
|
|
@ -697,6 +701,7 @@ int sdp_to_media_description(sdp_message_t *msg, SalMediaDescription *desc, IceS
|
|||
} else {
|
||||
ice_session_set_role(*ice_session, IR_Controlled);
|
||||
}
|
||||
ice_session_check_mismatch(*ice_session);
|
||||
}
|
||||
if ((ice_ufrag != NULL) && (ice_pwd != NULL)) {
|
||||
ice_session_set_remote_credentials(*ice_session, ice_ufrag, ice_pwd);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue