From 921ab71947abbf4efe9dd2c6db3edf838536ce6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 3 Oct 2014 16:30:16 -0400 Subject: conncheck: Insert the candidates sorted after setting the priority --- agent/conncheck.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'agent/conncheck.c') 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 -- cgit v1.2.1