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

Unified Diff: remoting/protocol/libjingle_transport_factory.cc

Issue 9549029: Set incoming_only flag on the host side when NAT traversal is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
Index: remoting/protocol/libjingle_transport_factory.cc
diff --git a/remoting/protocol/libjingle_transport_factory.cc b/remoting/protocol/libjingle_transport_factory.cc
index 3dbedf742cef9ad5797b3c5e82db51f1b1194f8e..75f04521520e88efc5143162860ddf16ea08d544 100644
--- a/remoting/protocol/libjingle_transport_factory.cc
+++ b/remoting/protocol/libjingle_transport_factory.cc
@@ -140,7 +140,7 @@ void LibjingleStreamTransport::Connect(
// when it is used together with TCP the performance is very bad
// so we explicitly disable TCP connections.
int port_allocator_flags = cricket::PORTALLOCATOR_DISABLE_TCP;
- if (config_.nat_traversal) {
+ if (config_.nat_traversal_mode == TransportConfig::NAT_TRAVERSAL_ENABLED) {
http_port_allocator_ = new cricket::HttpPortAllocator(
network_manager_, socket_factory_, "");
port_allocator_.reset(http_port_allocator_);
@@ -164,6 +164,8 @@ void LibjingleStreamTransport::Connect(
this, &LibjingleStreamTransport::OnCandidateReady);
channel_->SignalRouteChange.connect(
this, &LibjingleStreamTransport::OnRouteChange);
+ if (config_.nat_traversal_mode == TransportConfig::NAT_TRAVERSAL_DISABLED)
+ channel_->set_incoming_only(true);
channel_->Connect();

Powered by Google App Engine
This is Rietveld 408576698