Commit 692b1055 authored by Fabrice Bellet's avatar Fabrice Bellet

conncheck: merge two cascaded conditions

parent db9c2ca6
...@@ -3557,26 +3557,24 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent * ...@@ -3557,26 +3557,24 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
nice_component_add_valid_candidate (agent, component, remote_candidate); nice_component_add_valid_candidate (agent, component, remote_candidate);
} }
else { else {
if (!local_cand) { if (local_cand == NULL && !agent->force_relay) {
if (!agent->force_relay) { /* step: find a new local candidate, see RFC 5245 7.1.3.2.1.
/* step: find a new local candidate, see RFC 5245 7.1.3.2.1. * "Discovering Peer Reflexive Candidates"
* "Discovering Peer Reflexive Candidates" *
* * The priority equal to the value of the PRIORITY attribute
* The priority equal to the value of the PRIORITY attribute * in the Binding request is taken from the "parent" pair p
* in the Binding request is taken from the "parent" pair p */
*/ local_cand = discovery_add_peer_reflexive_candidate (agent,
local_cand = discovery_add_peer_reflexive_candidate (agent, stream->id,
stream->id, component->id,
component->id, p->stun_priority,
p->stun_priority, &mapped,
&mapped, sockptr,
sockptr, local_candidate,
local_candidate, remote_candidate);
remote_candidate); nice_debug ("Agent %p : added a new peer-reflexive local candidate %p "
nice_debug ("Agent %p : added a new peer-reflexive local candidate %p " "with transport %s", agent, local_cand,
"with transport %s", agent, local_cand, priv_candidate_transport_to_string (local_cand->transport));
priv_candidate_transport_to_string (local_cand->transport));
}
} }
/* step: add a new discovered pair (see RFC 5245 7.1.3.2.2 /* step: add a new discovered pair (see RFC 5245 7.1.3.2.2
......
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