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

Unified Diff: remoting/jingle_glue/chromium_port_allocator.cc

Issue 209323002: New policies: enable/disable relay; port range (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed android build. Created 6 years, 8 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 | « remoting/host/remoting_me2me_host.cc ('k') | remoting/jingle_glue/network_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/chromium_port_allocator.cc
diff --git a/remoting/jingle_glue/chromium_port_allocator.cc b/remoting/jingle_glue/chromium_port_allocator.cc
index a1796506cf7541038a8447f24af9ff78a5c0275b..278cb6c2550a45610c7d6aac4b0e18c0d42c4951 100644
--- a/remoting/jingle_glue/chromium_port_allocator.cc
+++ b/remoting/jingle_glue/chromium_port_allocator.cc
@@ -147,11 +147,13 @@ scoped_ptr<ChromiumPortAllocator> ChromiumPortAllocator::Create(
int flags = cricket::PORTALLOCATOR_DISABLE_TCP |
cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
cricket::PORTALLOCATOR_ENABLE_IPV6;
- if (network_settings.nat_traversal_mode !=
- NetworkSettings::NAT_TRAVERSAL_ENABLED) {
- flags |= cricket::PORTALLOCATOR_DISABLE_STUN |
- cricket::PORTALLOCATOR_DISABLE_RELAY;
- }
+
+ if (!(network_settings.flags & NetworkSettings::NAT_TRAVERSAL_STUN))
+ flags |= cricket::PORTALLOCATOR_DISABLE_STUN;
+
+ if (!(network_settings.flags & NetworkSettings::NAT_TRAVERSAL_RELAY))
+ flags |= cricket::PORTALLOCATOR_DISABLE_RELAY;
+
result->set_flags(flags);
result->SetPortRange(network_settings.min_port,
network_settings.max_port);
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/jingle_glue/network_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698