| Index: webrtc/p2p/base/stunport.h
|
| diff --git a/webrtc/p2p/base/stunport.h b/webrtc/p2p/base/stunport.h
|
| index d840a97126b9e74b24ba5e0750da32821d6b4fdc..274f188f28ef33f42334044a3a8d28e080db6857 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,10 @@ 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;
|
| };
|
|
|
| @@ -245,7 +255,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);
|
|
|