conncheck: ignore refreshes for tls turn server for OC2007R2
authorFabrice Bellet <fabrice@bellet.info>
Thu, 7 May 2020 19:24:09 +0000 (21:24 +0200)
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>
Fri, 8 May 2020 18:53:38 +0000 (18:53 +0000)
Relay candidates obtained from TLS turn server don't have to be
refreshed in OC2007R2 compatibility mode.

agent/conncheck.c

index 15e958b..d58ec3b 100644 (file)
@@ -3794,7 +3794,9 @@ priv_add_new_turn_refresh (NiceAgent *agent, CandidateDiscovery *cdisco,
 {
   CandidateRefresh *cand;
 
-  if (cdisco->turn->type != NICE_RELAY_TYPE_TURN_UDP)
+  if (cdisco->turn->type == NICE_RELAY_TYPE_TURN_TLS &&
+      (agent->compatibility == NICE_COMPATIBILITY_OC2007 ||
+       agent->compatibility == NICE_COMPATIBILITY_OC2007R2))
     return;
 
   cand = g_slice_new0 (CandidateRefresh);