From 768e97c47a3c2f4af46113ca2b81d355d02f6ae2 Mon Sep 17 00:00:00 2001 From: Fletcher Dunn Date: Tue, 12 May 2020 13:34:25 -0700 Subject: [PATCH] Added spew Also added a hack to disallow host candidates, but commented it out. --- .../clientlib/steamnetworkingsockets_p2p_ice.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p_ice.cpp b/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p_ice.cpp index 66e2251..9e4ad0c 100644 --- a/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p_ice.cpp +++ b/src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p_ice.cpp @@ -99,6 +99,7 @@ void CConnectionTransportP2PICE::Init() return; } + SpewType( LogLevel_P2PRendezvous(), "[%s] Using STUN server list: %s\n", ConnectionDescription(), m_connection.m_connectionConfig.m_P2P_STUN_ServerList.Get().c_str() ); { CUtlVectorAutoPurge tempStunServers; V_AllocAndSplitString( m_connection.m_connectionConfig.m_P2P_STUN_ServerList.Get().c_str(), ",", tempStunServers ); @@ -908,6 +909,10 @@ const char *CConnectionTransportP2PICE::GetStunServer( int iIndex ) void CConnectionTransportP2PICE::OnIceCandidateAdded( const char *pszSDPMid, int nSDPMLineIndex, const char *pszCandidate ) { + // !KLUDGE! Disable local candidates, force use of STUN + //if ( V_stristr( pszCandidate, " host " ) ) + // return; + struct RunIceCandidateAdded : IConnectionTransportP2PICERunWithLock { CMsgWebRTCRendezvous_Candidate candidate;