Commit 6919a4d3 authored by Olivier Crête's avatar Olivier Crête

conncheck: Insert peer reflexive pair sorted

The rest of the list is sorted, but this was just appended, making it likely
to be dropped if the list grows too long.
parent e01b3e02
...@@ -2165,7 +2165,6 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint ...@@ -2165,7 +2165,6 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint
CandidateCheckPair *pair = g_slice_new0 (CandidateCheckPair); CandidateCheckPair *pair = g_slice_new0 (CandidateCheckPair);
Stream *stream = agent_find_stream (agent, stream_id); Stream *stream = agent_find_stream (agent, stream_id);
stream->conncheck_list = g_slist_append (stream->conncheck_list, pair);
pair->agent = agent; pair->agent = agent;
pair->stream_id = stream_id; pair->stream_id = stream_id;
pair->component_id = component_id;; pair->component_id = component_id;;
...@@ -2186,6 +2185,9 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint ...@@ -2186,6 +2185,9 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint
pair->controlling = agent->controlling_mode; pair->controlling = agent->controlling_mode;
nice_debug ("Agent %p : added a new peer-discovered pair with foundation of '%s'.", agent, pair->foundation); nice_debug ("Agent %p : added a new peer-discovered pair with foundation of '%s'.", agent, pair->foundation);
stream->conncheck_list = g_slist_insert_sorted (stream->conncheck_list, pair,
(GCompareFunc)conn_check_compare);
return pair; return pair;
} }
......
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