Commit c251cbfd authored by Olivier Crête's avatar Olivier Crête

agent: Remove useless checks from priv_add_new_candidate_discovery_stun

parent c5f52ce9
...@@ -1300,16 +1300,12 @@ priv_add_new_candidate_discovery_stun (NiceAgent *agent, ...@@ -1300,16 +1300,12 @@ priv_add_new_candidate_discovery_stun (NiceAgent *agent,
Stream *stream, guint component_id) Stream *stream, guint component_id)
{ {
CandidateDiscovery *cdisco; CandidateDiscovery *cdisco;
GSList *modified_list;
/* note: no need to check for redundant candidates, as this is /* note: no need to check for redundant candidates, as this is
* done later on in the process */ * done later on in the process */
cdisco = g_slice_new0 (CandidateDiscovery); cdisco = g_slice_new0 (CandidateDiscovery);
if (cdisco) {
modified_list = g_slist_append (agent->discovery_list, cdisco);
if (modified_list) {
cdisco->type = NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE; cdisco->type = NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE;
cdisco->nicesock = socket; cdisco->nicesock = socket;
cdisco->server = server; cdisco->server = server;
...@@ -1321,14 +1317,11 @@ priv_add_new_candidate_discovery_stun (NiceAgent *agent, ...@@ -1321,14 +1317,11 @@ priv_add_new_candidate_discovery_stun (NiceAgent *agent,
nice_debug ("Agent %p : Adding new srv-rflx candidate discovery %p\n", nice_debug ("Agent %p : Adding new srv-rflx candidate discovery %p\n",
agent, cdisco); agent, cdisco);
agent->discovery_list = modified_list;
agent->discovery_list = g_slist_append (agent->discovery_list, cdisco);
++agent->discovery_unsched_items; ++agent->discovery_unsched_items;
}
return TRUE; return TRUE;
}
return FALSE;
} }
static gboolean static gboolean
......
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