Commit ae2fb900 authored by Fabrice Bellet's avatar Fabrice Bellet

conncheck: ignore selected pairs for nomination that failed

When evaluating the stopping criterion, failed pairs from other streams
having the "use_candidate_on_next_check" flag set should be
ignored.

This should normally not happen, because a pair selected for nomination
has no reason to fail when being rechecked, since it previously
worked... but it may happen with Skype for Business, when libnice
selects a tcp pair for component 1, the peer seems to have no interest
in the second component and lets it fail in the middle of the conncheck.
parent 0176c2fa
...@@ -951,7 +951,8 @@ priv_conn_check_tick_stream_nominate (NiceStream *stream, NiceAgent *agent) ...@@ -951,7 +951,8 @@ priv_conn_check_tick_stream_nominate (NiceStream *stream, NiceAgent *agent)
continue; continue;
for (j = s->conncheck_list; j ; j = j->next) { for (j = s->conncheck_list; j ; j = j->next) {
CandidateCheckPair *p = j->data; CandidateCheckPair *p = j->data;
if (p->nominated || p->use_candidate_on_next_check) { if (p->nominated || (p->use_candidate_on_next_check &&
p->state != NICE_CHECK_FAILED)) {
other_stream_pair = p; other_stream_pair = p;
break; break;
} }
...@@ -1058,7 +1059,8 @@ priv_conn_check_tick_stream_nominate (NiceStream *stream, NiceAgent *agent) ...@@ -1058,7 +1059,8 @@ priv_conn_check_tick_stream_nominate (NiceStream *stream, NiceAgent *agent)
CandidateCheckPair *p = j->data; CandidateCheckPair *p = j->data;
if (p->component_id == component->id) if (p->component_id == component->id)
continue; continue;
if (p->nominated || p->use_candidate_on_next_check) { if (p->nominated || (p->use_candidate_on_next_check &&
p->state != NICE_CHECK_FAILED)) {
other_component_pair = p; other_component_pair = p;
break; break;
} }
......
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