From bfc991166112b62f593b040398f981bc9a721cbd Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Sun, 3 Feb 2019 00:08:18 +0100 Subject: [PATCH] Remove TCPPort incoming_only_ member. TCPPort's incoming_only_ member seems unused and there was a TODO about this. This CL just removes it. Bug: webrtc:10198 Change-Id: I216c291159a32fa2924309affa3769a4be116fd0 Reviewed-on: https://webrtc-review.googlesource.com/c/120931 Reviewed-by: Steve Anton Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#26538} --- p2p/base/tcp_port.cc | 5 ----- p2p/base/tcp_port.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/p2p/base/tcp_port.cc b/p2p/base/tcp_port.cc index f98322a9d9..07ca30007d 100644 --- a/p2p/base/tcp_port.cc +++ b/p2p/base/tcp_port.cc @@ -97,7 +97,6 @@ TCPPort::TCPPort(rtc::Thread* thread, max_port, username, password), - incoming_only_(false), allow_listen_(allow_listen), socket_(NULL), error_(0) { @@ -133,10 +132,6 @@ Connection* TCPPort::CreateConnection(const Candidate& address, if (origin == ORIGIN_OTHER_PORT) return NULL; - // Check if we are allowed to make outgoing TCP connections - if (incoming_only_ && (origin == ORIGIN_MESSAGE)) - return NULL; - // We don't know how to act as an ssl server yet if ((address.protocol() == SSLTCP_PROTOCOL_NAME) && (origin == ORIGIN_THIS_PORT)) { diff --git a/p2p/base/tcp_port.h b/p2p/base/tcp_port.h index 67716f73b2..60c2d0442e 100644 --- a/p2p/base/tcp_port.h +++ b/p2p/base/tcp_port.h @@ -104,8 +104,6 @@ class TCPPort : public Port { void OnAddressReady(rtc::AsyncPacketSocket* socket, const rtc::SocketAddress& address); - // TODO(?): Is this still needed? - bool incoming_only_; bool allow_listen_; rtc::AsyncPacketSocket* socket_; int error_;