diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2012-02-15 16:13:31 -0500 |
---|---|---|
committer | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2012-02-15 16:14:04 -0500 |
commit | 1687711aae0f4cb63a78ed93e73d169099c82248 (patch) | |
tree | 8da91a35e571bb5f5dcca3c5fa9cc00a144ea9ad | |
parent | 9c92154ea82ece11d0f531813238ac73e484ecf5 (diff) |
Fix peer reflexive valid pair priority.
Should use the remote priority rather than the priority of the parent pair
Thanks to Filippo Della Betta
-rw-r--r-- | agent/conncheck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c index e8b015a..165139b 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -1922,11 +1922,11 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint g_snprintf (pair->foundation, NICE_CANDIDATE_PAIR_MAX_FOUNDATION, "%s:%s", local_cand->foundation, parent_pair->remote->foundation); if (agent->controlling_mode == TRUE) - pair->priority = nice_candidate_pair_priority (local_cand->priority, - parent_pair->priority); + pair->priority = nice_candidate_pair_priority (pair->local->priority, + pair->remote->priority); else - pair->priority = nice_candidate_pair_priority (parent_pair->priority, - local_cand->priority); + pair->priority = nice_candidate_pair_priority (pair->remote->priority, + pair->local->priority); pair->nominated = FALSE; pair->controlling = agent->controlling_mode; nice_debug ("Agent %p : added a new peer-discovered pair with foundation of '%s'.", agent, pair->foundation); |