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

discovery: Remove useless checks from discovery_learn_remote_peer_reflexive_candidate

parent 2664581b
...@@ -770,8 +770,6 @@ NiceCandidate *discovery_learn_remote_peer_reflexive_candidate ( ...@@ -770,8 +770,6 @@ NiceCandidate *discovery_learn_remote_peer_reflexive_candidate (
(void)udp_socket; (void)udp_socket;
candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_PEER_REFLEXIVE); candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_PEER_REFLEXIVE);
if (candidate) {
GSList *modified_list;
candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP; candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP;
candidate->addr = *remote_address; candidate->addr = *remote_address;
...@@ -825,21 +823,14 @@ NiceCandidate *discovery_learn_remote_peer_reflexive_candidate ( ...@@ -825,21 +823,14 @@ NiceCandidate *discovery_learn_remote_peer_reflexive_candidate (
candidate->password = g_strdup(remote->password); candidate->password = g_strdup(remote->password);
} }
candidate->sockptr = NULL; /* not stored for remote candidates */ candidate->sockptr = NULL; /* not stored for remote candidates */
/* note: candidate username and password are left NULL as stream /* note: candidate username and password are left NULL as stream
level ufrag/password are used */ level ufrag/password are used */
modified_list = g_slist_append (component->remote_candidates, component->remote_candidates = g_slist_append (component->remote_candidates,
candidate); candidate);
if (modified_list) {
component->remote_candidates = modified_list;
agent_signal_new_remote_candidate (agent, candidate); agent_signal_new_remote_candidate (agent, candidate);
}
else { /* error: memory alloc / list */
nice_candidate_free (candidate), candidate = NULL;
}
}
return candidate; return 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