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

conncheck: fix peer-reflexive priority in discovered pair

The peer-reflexive priority used in the STUN request is copied from the
parent succeeded pair to the discovered pair. This value is not required
for discovered pair, that won't emit stun requests themselves, but may
be used when such pair becomes the selected pair, and when keepalive
stun are emitted, using the sockptr and prflx_priority values from the
succeeded pair.
parent 8593bc3b
...@@ -3304,9 +3304,13 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint ...@@ -3304,9 +3304,13 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint
pair->priority = nice_candidate_pair_priority (pair->remote->priority, pair->priority = nice_candidate_pair_priority (pair->remote->priority,
pair->local->priority); pair->local->priority);
pair->nominated = parent_pair->nominated; pair->nominated = parent_pair->nominated;
pair->prflx_priority = ensure_unique_prflx_priority (stream, component, /* the peer-reflexive priority used in stun request is copied from
local_cand->priority, * the parent succeeded pair. This value is not required for discovered
peer_reflexive_candidate_priority (agent, local_cand)); * pair, that won't emit stun requests themselves, but may be used when
* such pair becomes the selected pair, and when keepalive stun are emitted,
* using the sockptr and prflx_priority values from the succeeded pair.
*/
pair->prflx_priority = parent_pair->prflx_priority;
nice_debug ("Agent %p : added a new peer-discovered pair %p with " nice_debug ("Agent %p : added a new peer-discovered pair %p with "
"foundation '%s' and transport %s:%s to stream %u component %u", "foundation '%s' and transport %s:%s to stream %u component %u",
agent, pair, pair->foundation, agent, pair, pair->foundation,
......
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