diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2016-06-14 21:20:49 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2017-06-21 16:05:57 -0400 |
commit | f19d209decac432a1597d84c3d5809d2208f7457 (patch) | |
tree | 27ccca8fc787f4b51520a0ae5a58def542abda70 /agent | |
parent | 59fe48517c0b7db77b99183d31fdd84b55adb5d4 (diff) | |
download | libnice-f19d209decac432a1597d84c3d5809d2208f7457.tar.gz |
conncheck: do not recheck a just succeeded pair
We cancel the potential in-progress transaction cancellation, caused by
sect 7.2.1.4 "Triggered Checks", when we receive a valid reply before
transmission timeout, or just after timeout, when the pair is
temporarily put on the triggered check list on the way to be
rechecked. This situation is not covered by the RFC 5245.
Differential Revision: https://phabricator.freedesktop.org/D1119
Diffstat (limited to 'agent')
-rw-r--r-- | agent/conncheck.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c index e1a5cf1..4b785b5 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -3117,6 +3117,16 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent * if (new_pair == p) p->valid = TRUE; p->state = NICE_CHECK_SUCCEEDED; + /* note: we cancel the potential in-progress transaction + * cancellation, caused by sect 7.2.1.4 "Triggered Checks", if + * we receive a valid reply before transmission timeout... + */ + p->recheck_on_timeout = FALSE; + /* ... or just after the transmission timeout, while the pair is + * temporarily put on the triggered check list on the way to be + * be rechecked: we remove it from the list too. + */ + priv_remove_pair_from_triggered_check_queue (agent, p); nice_debug ("Agent %p : conncheck %p SUCCEEDED.", agent, p); nice_component_add_valid_candidate (component, remote_candidate); } @@ -3151,6 +3161,8 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent * * Succeeded, RFC 5245, 7.1.3.2.3, "Updating Pair States" */ p->state = NICE_CHECK_SUCCEEDED; + p->recheck_on_timeout = FALSE; + priv_remove_pair_from_triggered_check_queue (agent, p); nice_debug ("Agent %p : conncheck %p SUCCEEDED, %p DISCOVERED.", agent, p, new_pair); } |