Commit 714f1ee6 authored by Olivier Crête's avatar Olivier Crête

discovery: Remove useless checks from discovery_add_reflexive_candidate

parent 231943d2
......@@ -542,7 +542,7 @@ discovery_add_server_reflexive_candidate (
return NULL;
candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE);
if (candidate) {
if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) {
candidate->priority = nice_candidate_jingle_priority (candidate);
} else if (agent->compatibility == NICE_COMPATIBILITY_MSN) {
......@@ -567,10 +567,9 @@ discovery_add_server_reflexive_candidate (
agent_signal_new_candidate (agent, candidate);
}
else {
/* error: memory allocation, or duplicate candidatet */
/* error: duplicate candidate */
nice_candidate_free (candidate), candidate = NULL;
}
}
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