summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2023-01-04 14:39:44 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2023-01-04 14:40:31 -0500
commitc92288f2ae8c490610567f9490a6f1ed2af07324 (patch)
treebcc9ad46462b324655a515fa6d3ba3fd04d80058
parentb9da8180372bd45aad31231faa63bea34ab67572 (diff)
downloadlibnice-c92288f2ae8c490610567f9490a6f1ed2af07324.tar.gz
agent: Allow getting UDP candidates from a TURN server over TCP
Even if the TCP candidates are disabled.
-rw-r--r--agent/agent.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/agent/agent.c b/agent/agent.c
index 8994906..fe7a299 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -2926,13 +2926,8 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent,
agent->compatibility == NICE_COMPATIBILITY_OC2007R2))
reliable_tcp = TRUE;
- /* Ignore tcp candidates if we disabled ice-tcp */
- if ((agent->use_ice_udp == FALSE && reliable_tcp == FALSE) ||
- (agent->use_ice_tcp == FALSE && reliable_tcp == TRUE)) {
- goto skip;
- }
-
- if (turn_tcp == FALSE) {
+ /* Ignore reliable tcp candidates if we disabled ice-tcp */
+ if (agent->use_ice_tcp == FALSE && reliable_tcp == TRUE) {
goto skip;
}