Commit 5aa6553b authored by Olivier Crête's avatar Olivier Crête 👻

agent: Remove useless checks from nice_agent_add_local_address

parent 6f5dd4a3
...@@ -1900,24 +1900,15 @@ NICEAPI_EXPORT gboolean ...@@ -1900,24 +1900,15 @@ NICEAPI_EXPORT gboolean
nice_agent_add_local_address (NiceAgent *agent, NiceAddress *addr) nice_agent_add_local_address (NiceAgent *agent, NiceAddress *addr)
{ {
NiceAddress *dup; NiceAddress *dup;
GSList *modified_list;
gboolean ret = FALSE;
agent_lock(); agent_lock();
dup = nice_address_dup (addr); dup = nice_address_dup (addr);
nice_address_set_port (dup, 0); nice_address_set_port (dup, 0);
modified_list = g_slist_append (agent->local_addresses, dup); agent->local_addresses = g_slist_append (agent->local_addresses, dup);
if (modified_list) {
agent->local_addresses = modified_list;
ret = TRUE;
goto done;
}
done:
agent_unlock(); agent_unlock();
return ret; return TRUE;
} }
static gboolean priv_add_remote_candidate ( static gboolean priv_add_remote_candidate (
......
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