Index: webrtc/p2p/base/portallocator.h |
diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h |
index 3c81068060a3a717f94e329db7ed541dc86c9e51..25e6e5843d6a87104eb13585747382d934266d15 100644 |
--- a/webrtc/p2p/base/portallocator.h |
+++ b/webrtc/p2p/base/portallocator.h |
@@ -119,13 +119,24 @@ struct RelayServerConfig { |
int port, |
const std::string& username, |
const std::string& password, |
- ProtocolType proto, |
- bool secure) |
+ ProtocolType proto) |
: type(RELAY_TURN), credentials(username, password) { |
- ports.push_back( |
- ProtocolAddress(rtc::SocketAddress(address, port), proto, secure)); |
+ ports.push_back(ProtocolAddress(rtc::SocketAddress(address, port), proto)); |
} |
+ // Legacy constructor where "secure" and PROTO_TCP implies PROTO_TLS. |
+ RelayServerConfig(const std::string& address, |
+ int port, |
+ const std::string& username, |
+ const std::string& password, |
+ ProtocolType proto, |
+ bool secure) |
+ : RelayServerConfig(address, |
+ port, |
+ username, |
+ password, |
+ (proto == PROTO_TCP && secure ? PROTO_TLS : proto)) {} |
+ |
bool operator==(const RelayServerConfig& o) const { |
return type == o.type && ports == o.ports && credentials == o.credentials && |
priority == o.priority; |