Index: remoting/client/plugin/pepper_port_allocator.cc |
diff --git a/remoting/client/plugin/pepper_port_allocator.cc b/remoting/client/plugin/pepper_port_allocator.cc |
index 5cceee1b9a2aa890a296310d0120fc37b78cdf4c..87f4bf4658c42bbdf3a070efd6a5d62a449f70ac 100644 |
--- a/remoting/client/plugin/pepper_port_allocator.cc |
+++ b/remoting/client/plugin/pepper_port_allocator.cc |
@@ -103,14 +103,13 @@ PepperPortAllocatorSession::~PepperPortAllocatorSession() { |
void PepperPortAllocatorSession::ConfigReady( |
cricket::PortConfiguration* config) { |
- if (config->stun_address.IsUnresolved()) { |
+ if (!config->stun_servers.empty() && |
Sergey Ulanov
2014/08/08 19:57:16
FYI: there is https://codereview.chromium.org/4529
|
+ config->stun_servers.begin()->IsUnresolved()) { |
// Make sure that the address that we pass to ConfigReady() is |
// always resolved. |
- if (stun_address_.IsUnresolved()) { |
- config->stun_address.Clear(); |
- } else { |
- config->stun_address = stun_address_; |
- } |
+ config->stun_servers.clear(); |
+ if (!stun_address_.IsUnresolved()) |
+ config->stun_servers.insert(stun_address_); |
} |
// Filter out non-UDP relay ports, so that we don't try using TCP. |
@@ -132,7 +131,7 @@ void PepperPortAllocatorSession::GetPortConfigurations() { |
// Add an empty configuration synchronously, so a local connection |
// can be started immediately. |
ConfigReady(new cricket::PortConfiguration( |
- rtc::SocketAddress(), std::string(), std::string())); |
+ cricket::ServerAddresses(), std::string(), std::string())); |
ResolveStunServerAddress(); |
TryCreateRelaySession(); |
@@ -198,8 +197,10 @@ void PepperPortAllocatorSession::OnStunAddressResolved(int32_t result) { |
ReceiveSessionResponse(std::string(relay_response_body_.begin(), |
relay_response_body_.end())); |
} else { |
+ cricket::ServerAddresses stun; |
+ stun.insert(stun_address_); |
ConfigReady(new cricket::PortConfiguration( |
- stun_address_, std::string(), std::string())); |
+ stun, std::string(), std::string())); |
} |
} |