summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Bellet <fabrice@bellet.info>2019-07-15 14:47:11 +0200
committerFabrice Bellet <fabrice@bellet.info>2019-07-30 20:34:20 +0200
commitae2fb9003634d0cf8d129bb4c7c2ab1dba4e18ea (patch)
treee06d00826c36df56676532a3884dae3c7feac877
parent0176c2faaaf739ac1b0e019916f7c680d64fde62 (diff)
downloadlibnice-ae2fb9003634d0cf8d129bb4c7c2ab1dba4e18ea.tar.gz
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.
-rw-r--r--agent/conncheck.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 755222d..0e3d1c0 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -951,7 +951,8 @@ priv_conn_check_tick_stream_nominate (NiceStream *stream, NiceAgent *agent)
continue;
for (j = s->conncheck_list; j ; j = j->next) {
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;
break;
}
@@ -1058,7 +1059,8 @@ priv_conn_check_tick_stream_nominate (NiceStream *stream, NiceAgent *agent)
CandidateCheckPair *p = j->data;
if (p->component_id == component->id)
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;
break;
}