Commit 2664581b authored by Olivier Crête's avatar Olivier Crête

discovery: Remove useless checks from discovery_add_peer_reflexive_candidate

parent 714f1ee6
...@@ -676,13 +676,12 @@ discovery_add_peer_reflexive_candidate ( ...@@ -676,13 +676,12 @@ discovery_add_peer_reflexive_candidate (
NiceCandidate *candidate; NiceCandidate *candidate;
Component *component; Component *component;
Stream *stream; Stream *stream;
gboolean result;
if (!agent_find_component (agent, stream_id, component_id, &stream, &component)) if (!agent_find_component (agent, stream_id, component_id, &stream, &component))
return NULL; return NULL;
candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_PEER_REFLEXIVE); candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_PEER_REFLEXIVE);
if (candidate) {
gboolean result;
candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP; candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP;
if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) {
...@@ -741,7 +740,6 @@ discovery_add_peer_reflexive_candidate ( ...@@ -741,7 +740,6 @@ discovery_add_peer_reflexive_candidate (
/* error: memory allocation, or duplicate candidatet */ /* error: memory allocation, or duplicate candidatet */
nice_candidate_free (candidate), candidate = NULL; 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