Commit 6fe9b797 authored by Olivier Crête's avatar Olivier Crête

component: Remove useless checks in component_set_selected_remote_candidate

parent d9d3d5c8
...@@ -310,21 +310,11 @@ component_set_selected_remote_candidate (NiceAgent *agent, Component *component, ...@@ -310,21 +310,11 @@ component_set_selected_remote_candidate (NiceAgent *agent, Component *component,
candidate->transport); candidate->transport);
if (!remote) { if (!remote) {
GSList *modified_list = NULL;
remote = nice_candidate_copy (candidate); remote = nice_candidate_copy (candidate);
component->remote_candidates = g_slist_append (component->remote_candidates,
modified_list = g_slist_append (component->remote_candidates,
remote); remote);
if (modified_list) {
component->remote_candidates = modified_list;
agent_signal_new_remote_candidate (agent, remote); agent_signal_new_remote_candidate (agent, remote);
} }
else { /* error: memory alloc / list */
nice_candidate_free (remote), remote = NULL;
return NULL;
}
}
if (component->selected_pair.keepalive.tick_source != NULL) { if (component->selected_pair.keepalive.tick_source != NULL) {
g_source_destroy (component->selected_pair.keepalive.tick_source); g_source_destroy (component->selected_pair.keepalive.tick_source);
......
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