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

Unified Diff: remoting/jingle_glue/jingle_info_request.cc

Issue 7599017: Framework to allow Chromoting host to respect NAT traversal policy in linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small tweaks Created 9 years, 4 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/plugin/policy_hack/nat_policy_win.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/jingle_info_request.cc
diff --git a/remoting/jingle_glue/jingle_info_request.cc b/remoting/jingle_glue/jingle_info_request.cc
index 1dabf2625e8fe0af0f3d6c891bb4f054542edde9..2dcdcc00b189b0e380e2d5d7cdcadf7c2b291e60 100644
--- a/remoting/jingle_glue/jingle_info_request.cc
+++ b/remoting/jingle_glue/jingle_info_request.cc
@@ -57,13 +57,20 @@ void JingleInfoRequest::OnResponse(const buzz::XmlElement* stanza) {
int port;
if (!base::StringToInt(port_str, &port)) {
LOG(WARNING) << "Unable to parse port in stanza" << stanza->Str();
- } else {
+ continue;
+ }
+
+ if (host_resolver_factory_) {
net::IPAddressNumber ip_number;
HostResolver* resolver = host_resolver_factory_->CreateHostResolver();
stun_dns_requests_.insert(resolver);
resolver->SignalDone.connect(
this, &JingleInfoRequest::OnStunAddressResponse);
resolver->Resolve(talk_base::SocketAddress(host, port));
+ } else {
+ // If there is no host_resolver_factory_, we're not sandboxes, so we
Jamie 2011/08/11 15:24:31 Nit: s/sandboxes/sandboxed/ :) Also, isn't it con
awong 2011/08/11 19:04:07 Done.
+ // can let libjingle itself do the DNS resolution.
+ stun_hosts_.push_back(talk_base::SocketAddress(host, port));
}
}
}
« no previous file with comments | « remoting/host/plugin/policy_hack/nat_policy_win.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698