Commit c80b4ff9 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Allow adding ICE losing pair with a reflexive or relayed local candidate.

parent b11ad955
......@@ -2064,10 +2064,16 @@ void ice_add_losing_pair(IceCheckList *cl, uint16_t componentID, const char *loc
elem = ms_list_find_custom(cl->pairs, (MSCompareFunc)ice_find_pair_from_candidates, &lr);
if (elem == NULL) {
ms_warning("ice: Candidate pair [0x%p,0x%p] should have been found", lr.local, lr.remote);
if (added_missing_relay_candidate == FALSE) {
/* Candidate pair has not been created but the candidates exist.
It must be that the local candidate is a reflexive or relayed candidate.
Therefore create this pair and use it. */
pair = ice_pair_new(cl, lr.local, lr.remote);
cl->pairs = ms_list_append(cl->pairs, pair);
} else return;
} else {
pair = (IceCandidatePair *)elem->data;
pair = (IceCandidatePair *)elem->data;
elem = ms_list_find_custom(cl->valid_list, (MSCompareFunc)ice_find_pair_in_valid_list, pair);
if (elem == NULL) {
LosingRemoteCandidate_InProgress_Failed lif;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment