Commit a602ff57 authored by Fabrice Bellet's avatar Fabrice Bellet
Browse files

conncheck: fix pair state transition when successful response is received

According the ICE RFC 5245,, the pair that *generated* a
successful check should go to state succeeded, not only the valid
pair built in section

Differential Revision:
parent 3a58ba61
......@@ -2654,7 +2654,10 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
else {
if (!local_cand) {
if (!agent->force_relay)
if (!agent->force_relay) {
/* step: find a new local candidate, see RFC 5245
* "Discovering Peer Reflexive Candidates"
local_cand = discovery_add_peer_reflexive_candidate (agent,
......@@ -2662,8 +2665,9 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
nice_debug ("Agent %p : pair %p state FAILED", agent, p);
nice_debug ("Agent %p : added a new peer-reflexive local candidate %p",
agent, local_cand);
/* step: add a new discovered pair (see RFC 5245
......@@ -2671,7 +2675,12 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
if (local_cand)
new_pair = priv_add_peer_reflexive_pair (agent, stream->id, component,
local_cand, p);
nice_debug ("Agent %p : conncheck %p FAILED, %p DISCOVERED.", agent, p, new_pair);
/* step: The agent sets the state of the pair that *generated* the check to
* Succeeded, RFC 5245,, "Updating Pair States"
nice_debug ("Agent %p : conncheck %p SUCCEEDED, %p DISCOVERED.",
agent, p, new_pair);
/* note: this is same as "adding to VALID LIST" in the spec
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