aboutsummaryrefslogtreecommitdiff
path: root/webrtc/p2p/base/stunport.h
diff options
context:
space:
mode:
authorGuo-wei Shieh <guoweis@webrtc.org>2015-08-18 17:00:13 -0700
committerGuo-wei Shieh <guoweis@webrtc.org>2015-08-19 00:00:21 +0000
commit370c8848ad38d54457a960e0ebe94f8adf370e23 (patch)
tree88fb2408cd7190555a1d789e342178772e9138d5 /webrtc/p2p/base/stunport.h
parentba9ab4cd8d2e8fbc068dc36b5e6f6331d7deeccf (diff)
downloadwebrtc-370c8848ad38d54457a960e0ebe94f8adf370e23.tar.gz
Revert "Generate localhost candidate when no STUN/TURN and portallocator has the right flag spefied."
This reverts commit 0a2955f227666efd87b2a303a69c083ef801c528. Revert "In the past, P2PPortAllocator.enable_multiple_routes is the indicator whether we should bind to the any address. It's easy to translate that into a port allocator flag in P2PPortAllocator's ctor. Going forward, we have to depend on an asynchronous permission check to determine whether gathering local address is allowed or not, hence the current way of passing it through constructor approach won't work any more. The asynchronous check will trigger SignalNetowrksChanged so we could only check that inside DoAllocate." This reverts commit ba9ab4cd8d2e8fbc068dc36b5e6f6331d7deeccf. TBR=pthatcher@webrtc.org Review URL: https://codereview.webrtc.org/1288843003 . Cr-Commit-Position: refs/heads/master@{#9729}
Diffstat (limited to 'webrtc/p2p/base/stunport.h')
-rw-r--r--webrtc/p2p/base/stunport.h24
1 files changed, 7 insertions, 17 deletions
diff --git a/webrtc/p2p/base/stunport.h b/webrtc/p2p/base/stunport.h
index 274f188f28..d840a97126 100644
--- a/webrtc/p2p/base/stunport.h
+++ b/webrtc/p2p/base/stunport.h
@@ -34,11 +34,9 @@ class UDPPort : public Port {
rtc::AsyncPacketSocket* socket,
const std::string& username,
const std::string& password,
- const std::string& origin,
- bool emit_localhost_for_anyaddress) {
+ const std::string& origin) {
UDPPort* port = new UDPPort(thread, factory, network, socket,
- username, password, origin,
- emit_localhost_for_anyaddress);
+ username, password, origin);
if (!port->Init()) {
delete port;
port = NULL;
@@ -54,12 +52,10 @@ class UDPPort : public Port {
uint16 max_port,
const std::string& username,
const std::string& password,
- const std::string& origin,
- bool emit_localhost_for_anyaddress) {
+ const std::string& origin) {
UDPPort* port = new UDPPort(thread, factory, network,
ip, min_port, max_port,
- username, password, origin,
- emit_localhost_for_anyaddress);
+ username, password, origin);
if (!port->Init()) {
delete port;
port = NULL;
@@ -114,8 +110,7 @@ class UDPPort : public Port {
uint16 max_port,
const std::string& username,
const std::string& password,
- const std::string& origin,
- bool emit_localhost_for_anyaddress);
+ const std::string& origin);
UDPPort(rtc::Thread* thread,
rtc::PacketSocketFactory* factory,
@@ -123,8 +118,7 @@ class UDPPort : public Port {
rtc::AsyncPacketSocket* socket,
const std::string& username,
const std::string& password,
- const std::string& origin,
- bool emit_localhost_for_anyaddress);
+ const std::string& origin);
bool Init();
@@ -208,10 +202,6 @@ class UDPPort : public Port {
bool ready_;
int stun_keepalive_delay_;
- // This is true when no STUN or TURN is specified in AllocationSequence and
- // PORTALLOCATOR_ENABLE_LOCALHOST_CANDIDATE is specified.
- bool emit_localhost_for_anyaddress_;
-
friend class StunBindingRequest;
};
@@ -255,7 +245,7 @@ class StunPort : public UDPPort {
const ServerAddresses& servers,
const std::string& origin)
: UDPPort(thread, factory, network, ip, min_port, max_port, username,
- password, origin, false) {
+ password, origin) {
// UDPPort will set these to local udp, updating these to STUN.
set_type(STUN_PORT_TYPE);
set_server_addresses(servers);