Index: webrtc/p2p/base/stunport.h |
diff --git a/webrtc/p2p/base/stunport.h b/webrtc/p2p/base/stunport.h |
index d840a97126b9e74b24ba5e0750da32821d6b4fdc..2967c15d959f33bb9ea01fdd759ebaa541c61a8a 100644 |
--- a/webrtc/p2p/base/stunport.h |
+++ b/webrtc/p2p/base/stunport.h |
@@ -34,9 +34,11 @@ class UDPPort : public Port { |
rtc::AsyncPacketSocket* socket, |
const std::string& username, |
const std::string& password, |
- const std::string& origin) { |
+ const std::string& origin, |
+ bool emit_localhost_for_anyaddress) { |
UDPPort* port = new UDPPort(thread, factory, network, socket, |
- username, password, origin); |
+ username, password, origin, |
+ emit_localhost_for_anyaddress); |
if (!port->Init()) { |
delete port; |
port = NULL; |
@@ -52,10 +54,12 @@ class UDPPort : public Port { |
uint16 max_port, |
const std::string& username, |
const std::string& password, |
- const std::string& origin) { |
+ const std::string& origin, |
+ bool emit_localhost_for_anyaddress) { |
UDPPort* port = new UDPPort(thread, factory, network, |
ip, min_port, max_port, |
- username, password, origin); |
+ username, password, origin, |
+ emit_localhost_for_anyaddress); |
if (!port->Init()) { |
delete port; |
port = NULL; |
@@ -110,7 +114,8 @@ class UDPPort : public Port { |
uint16 max_port, |
const std::string& username, |
const std::string& password, |
- const std::string& origin); |
+ const std::string& origin, |
+ bool emit_localhost_for_anyaddress); |
UDPPort(rtc::Thread* thread, |
rtc::PacketSocketFactory* factory, |
@@ -118,7 +123,8 @@ class UDPPort : public Port { |
rtc::AsyncPacketSocket* socket, |
const std::string& username, |
const std::string& password, |
- const std::string& origin); |
+ const std::string& origin, |
+ bool emit_localhost_for_anyaddress); |
bool Init(); |
@@ -202,6 +208,9 @@ class UDPPort : public Port { |
bool ready_; |
int stun_keepalive_delay_; |
+ // This is true when PORTALLOCATOR_ENABLE_LOCALHOST_CANDIDATE is specified. |
+ bool emit_localhost_for_anyaddress_; |
+ |
friend class StunBindingRequest; |
}; |
@@ -245,7 +254,7 @@ class StunPort : public UDPPort { |
const ServerAddresses& servers, |
const std::string& origin) |
: UDPPort(thread, factory, network, ip, min_port, max_port, username, |
- password, origin) { |
+ password, origin, false) { |
// UDPPort will set these to local udp, updating these to STUN. |
set_type(STUN_PORT_TYPE); |
set_server_addresses(servers); |