summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2014-03-14 09:24:08 (GMT)
committerPhilip Withnall <philip.withnall@collabora.co.uk>2014-04-15 17:35:35 (GMT)
commit2246d419821ed5f7ff463ed64b7ebb0eb42309aa (patch)
tree1cd9134b2bab70ef4673d65a49f3a7510d4919f5
parent354f2470431180b1ecfbee9dd76acd249da06342 (diff)
downloadlibnice-2246d419821ed5f7ff463ed64b7ebb0eb42309aa.tar.gz
libnice-2246d419821ed5f7ff463ed64b7ebb0eb42309aa.tar.xz
agent: Factor out a tiny bit of common code
-rw-r--r--agent/agent.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/agent/agent.c b/agent/agent.c
index afebec9..d91b77d 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -2509,8 +2509,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 */
@@ -2547,9 +2545,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;