From bbe2a370f79dc868302759430b5e122b5e6953a3 Mon Sep 17 00:00:00 2001 From: deadbeef Date: Wed, 3 May 2017 09:48:35 -0700 Subject: [PATCH] Fixing DCHECK in turnport.cc that was broken by refactoring. "PROTO_TCP + secure bit" was turned into "PROTO_TLS" by this CL: https://codereview.webrtc.org/2568833002 But a "DCHECK(proto == PROTO_TCP)" wasn't updated to take this into account. BUG=NONE TBR=pthatcher@webrtc.org Review-Url: https://codereview.webrtc.org/2859763003 Cr-Commit-Position: refs/heads/master@{#18000} --- webrtc/p2p/base/turnport.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webrtc/p2p/base/turnport.cc b/webrtc/p2p/base/turnport.cc index 56dadde9bb..e3caeb59d3 100644 --- a/webrtc/p2p/base/turnport.cc +++ b/webrtc/p2p/base/turnport.cc @@ -376,7 +376,11 @@ bool TurnPort::CreateTurnClientSocket() { } void TurnPort::OnSocketConnect(rtc::AsyncPacketSocket* socket) { - RTC_DCHECK(server_address_.proto == PROTO_TCP); + // This slot should only be invoked if we're using a connection-oriented + // protocol. + RTC_DCHECK(server_address_.proto == PROTO_TCP || + server_address_.proto == PROTO_TLS); + // Do not use this port if the socket bound to a different address than // the one we asked for. This is seen in Chrome, where TCP sockets cannot be // given a binding address, and the platform is expected to pick the