summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2017-04-11 18:31:21 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2017-04-11 18:31:21 -0400
commitb0538d8c51f65019867b56a45cf90a70bef38f01 (patch)
tree336ceb4bd181235a38d16f14b059981dfbdc8c10
parentf49ab88f957a3a250ef2ada0c0fab4fbbd3e5da8 (diff)
downloadlibnice-b0538d8c51f65019867b56a45cf90a70bef38f01.tar.gz
agent: Ignore remote candidate of non-accepted types
If we disable ice-tcp or ice-udp, ignore the remote candidates for those types.
-rw-r--r--agent/agent.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/agent/agent.c b/agent/agent.c
index eff62f0..77fb1eb 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -3112,6 +3112,13 @@ static gboolean priv_add_remote_candidate (
NiceComponent *component;
NiceCandidate *candidate;
+ if (transport == NICE_CANDIDATE_TRANSPORT_UDP &&
+ !agent->use_ice_udp)
+ return FALSE;
+ if (transport != NICE_CANDIDATE_TRANSPORT_UDP &&
+ !agent->use_ice_tcp)
+ return FALSE;
+
if (!agent_find_component (agent, stream_id, component_id, NULL, &component))
return FALSE;