Commit f19d209d authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

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
parent 59fe4851
...@@ -3117,6 +3117,16 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent * ...@@ -3117,6 +3117,16 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
if (new_pair == p) if (new_pair == p)
p->valid = TRUE; p->valid = TRUE;
p->state = NICE_CHECK_SUCCEEDED; 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_debug ("Agent %p : conncheck %p SUCCEEDED.", agent, p);
nice_component_add_valid_candidate (component, remote_candidate); nice_component_add_valid_candidate (component, remote_candidate);
} }
...@@ -3151,6 +3161,8 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent * ...@@ -3151,6 +3161,8 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
* Succeeded, RFC 5245, 7.1.3.2.3, "Updating Pair States" * Succeeded, RFC 5245, 7.1.3.2.3, "Updating Pair States"
*/ */
p->state = NICE_CHECK_SUCCEEDED; 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.", nice_debug ("Agent %p : conncheck %p SUCCEEDED, %p DISCOVERED.",
agent, p, new_pair); agent, p, new_pair);
} }
......
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