summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-10-03 16:30:16 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-10-09 16:26:07 -0400
commit921ab71947abbf4efe9dd2c6db3edf838536ce6c (patch)
treed5f38b1afde5a4997ab35a211588c95ffcc6c0a6
parent6919a4d36efe6312bdac47f8775e4e5bd9e1d801 (diff)
conncheck: Insert the candidates sorted after setting the priority
-rw-r--r--agent/conncheck.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 845ddae..1f57a0a 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -1375,9 +1375,6 @@ static void priv_add_new_check_pair (NiceAgent *agent, guint stream_id, Componen
stream = agent_find_stream (agent, stream_id);
pair = g_slice_new0 (CandidateCheckPair);
- stream->conncheck_list = g_slist_insert_sorted (stream->conncheck_list, pair,
- (GCompareFunc)conn_check_compare);
-
pair->agent = agent;
pair->stream_id = stream_id;
pair->component_id = component->id;;
@@ -1395,6 +1392,9 @@ static void priv_add_new_check_pair (NiceAgent *agent, guint stream_id, Componen
pair->nominated = use_candidate;
pair->controlling = agent->controlling_mode;
+ stream->conncheck_list = g_slist_insert_sorted (stream->conncheck_list, pair,
+ (GCompareFunc)conn_check_compare);
+
nice_debug ("Agent %p : added a new conncheck %p with foundation of '%s' to list %u.", agent, pair, pair->foundation, stream_id);
/* implement the hard upper limit for number of