From cd11af96b2a4e00d6bb195d8854a37209d566664 Mon Sep 17 00:00:00 2001
From: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Date: Wed, 14 Sep 2016 16:48:23 -0400
Subject: [PATCH] Revert "ring: use turn.ring.cx as default TURN server"

We're facing a PJSIP issue when forcing a TURN server in case
of unavailability of this last.
So we prefer to revert this patch until we found a solution
for solving that.

This reverts commit bd2d9d27a6663edf12d40bf3965fd80f87555e46.

Reviewed-by: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
Change-Id: I8ee88ae237a1ce56b74371cb513c7f98af1a5399
---
 src/ringdht/ringaccount.cpp | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp
index 89c6b29b58..95baebbe63 100644
--- a/src/ringdht/ringaccount.cpp
+++ b/src/ringdht/ringaccount.cpp
@@ -79,10 +79,6 @@ static constexpr auto ICE_NEGOTIATION_TIMEOUT = std::chrono::seconds(60);
 static constexpr auto TLS_TIMEOUT = std::chrono::seconds(30);
 
 static constexpr const char * const RING_URI_PREFIX = "ring:";
-static constexpr const char * DEFAULT_TURN_SERVER = "turn.ring.cx";
-static constexpr const char * DEFAULT_TURN_USERNAME = "ring";
-static constexpr const char * DEFAULT_TURN_PWD = "ring";
-static constexpr const char * DEFAULT_TURN_REALM = "ring";
 
 constexpr const char * const RingAccount::ACCOUNT_TYPE;
 /* constexpr */ const std::pair<uint16_t, uint16_t> RingAccount::DHT_PORT_RANGE {4000, 8888};
@@ -146,13 +142,6 @@ RingAccount::RingAccount(const std::string& accountID, bool /* presenceEnabled *
     cachePath_ = fileutils::get_cache_dir()+DIR_SEPARATOR_STR+getAccountID();
     dataPath_ = cachePath_ + DIR_SEPARATOR_STR "values";
     idPath_ = fileutils::get_data_dir()+DIR_SEPARATOR_STR+getAccountID();
-
-    // Force the SFL turn server if none provided yet
-    turnServer_ = DEFAULT_TURN_SERVER;
-    turnServerUserName_ = DEFAULT_TURN_USERNAME;
-    turnServerPwd_ = DEFAULT_TURN_PWD;
-    turnServerRealm_ = DEFAULT_TURN_REALM;
-    turnEnabled_ = true;
 }
 
 RingAccount::~RingAccount()
@@ -536,7 +525,6 @@ void
 RingAccount::setAccountDetails(const std::map<std::string, std::string> &details)
 {
     SIPAccountBase::setAccountDetails(details);
-
     if (hostname_.empty())
         hostname_ = DHT_DEFAULT_BOOTSTRAP;
     parseInt(details, Conf::CONFIG_DHT_PORT, dhtPort_);
-- 
GitLab