Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2313)

Unified Diff: webrtc/p2p/client/basicportallocator.cc

Issue 1424803004: Revert of Adding the ability to change ICE servers through SetConfiguration. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/client/basicportallocator.h ('k') | webrtc/p2p/client/fakeportallocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/client/basicportallocator.cc
diff --git a/webrtc/p2p/client/basicportallocator.cc b/webrtc/p2p/client/basicportallocator.cc
index 5d3397bf9166be5dca86bf9741e1a740865caeef..21c8921f4024c51b3679471595a97dae199c1625 100644
--- a/webrtc/p2p/client/basicportallocator.cc
+++ b/webrtc/p2p/client/basicportallocator.cc
@@ -104,19 +104,15 @@
stun_servers_(stun_servers) {
RelayServerConfig config(RELAY_GTURN);
- if (!relay_address_udp.IsNil()) {
+ if (!relay_address_udp.IsNil())
config.ports.push_back(ProtocolAddress(relay_address_udp, PROTO_UDP));
- }
- if (!relay_address_tcp.IsNil()) {
+ if (!relay_address_tcp.IsNil())
config.ports.push_back(ProtocolAddress(relay_address_tcp, PROTO_TCP));
- }
- if (!relay_address_ssl.IsNil()) {
+ if (!relay_address_ssl.IsNil())
config.ports.push_back(ProtocolAddress(relay_address_ssl, PROTO_SSLTCP));
- }
-
- if (!config.ports.empty()) {
- AddTurnServer(config);
- }
+
+ if (!config.ports.empty())
+ AddRelay(config);
Construct();
}
@@ -245,8 +241,8 @@
username(),
password());
- for (const RelayServerConfig& turn_server : allocator_->turn_servers()) {
- config->AddRelay(turn_server);
+ for (size_t i = 0; i < allocator_->relays().size(); ++i) {
+ config->AddRelay(allocator_->relays()[i]);
}
ConfigReady(config);
}
@@ -257,9 +253,8 @@
// Adds a configuration to the list.
void BasicPortAllocatorSession::OnConfigReady(PortConfiguration* config) {
- if (config) {
+ if (config)
configs_.push_back(config);
- }
AllocatePorts();
}
« no previous file with comments | « webrtc/p2p/client/basicportallocator.h ('k') | webrtc/p2p/client/fakeportallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698