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

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
CandidateCheckPair *pair = g_slice_new0 (CandidateCheckPair);
Stream *stream = agent_find_stream (agent, stream_id);
stream->conncheck_list = g_slist_append (stream->conncheck_list, pair);
pair->agent = agent;
pair->stream_id = stream_id;
pair->component_id = component_id;;
......@@ -2186,6 +2185,9 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint
pair->controlling = agent->controlling_mode;
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,
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