Commit fe79ad76 authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

agent: Factor out a tiny bit of common code

parent 23cd6e7a
......@@ -2518,8 +2518,6 @@ static gboolean priv_add_remote_candidate (
g_free (candidate->password);
candidate->password = g_strdup (password);
}
if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0)
goto errors;
}
else {
/* case 2: add a new candidate */
......@@ -2556,9 +2554,10 @@ static gboolean priv_add_remote_candidate (
if (foundation)
g_strlcpy (candidate->foundation, foundation,
NICE_CANDIDATE_MAX_FOUNDATION);
}
if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0)
goto errors;
if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0) {
goto errors;
}
return TRUE;
......
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