From d8d2c0417a89efa238d49073d966461ba48bdaeb Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Wed, 3 Jul 2019 22:09:03 +0200 Subject: agent: fix condition for turn-tcp discovery creation We support turn-tcp in oc2007 compatibility only and when the host candidate transport is compatible, ie when reliable_tcp is true. --- agent/agent.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/agent/agent.c b/agent/agent.c index d383e8d..d61376a 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -2637,12 +2637,9 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent, /* TURN-TCP is currently unsupport unless it's OC2007 compatibliity */ /* TODO: Add support for TURN-TCP */ - if (((agent->compatibility == NICE_COMPATIBILITY_OC2007 || - agent->compatibility == NICE_COMPATIBILITY_OC2007R2) && - reliable_tcp == FALSE) || - (!(agent->compatibility == NICE_COMPATIBILITY_OC2007 || - agent->compatibility == NICE_COMPATIBILITY_OC2007R2) && - reliable_tcp == TRUE)) { + if ((agent->compatibility != NICE_COMPATIBILITY_OC2007 && + agent->compatibility != NICE_COMPATIBILITY_OC2007R2) || + reliable_tcp == FALSE) { g_slice_free (CandidateDiscovery, cdisco); return; } -- cgit v1.2.1