diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-15 23:54:57 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-15 23:54:57 +0000 |
commit | c99278009759d8b7ee79d35af48889f8b292bce6 (patch) | |
tree | c9e039ce38a55381518b9dc9f516ba1dbff6a1ad /remoting/jingle_glue/jingle_info_request.cc | |
parent | 608ba33299c6e11d9d21f561372237a3fbe23ce8 (diff) | |
download | chromium_src-c99278009759d8b7ee79d35af48889f8b292bce6.zip chromium_src-c99278009759d8b7ee79d35af48889f8b292bce6.tar.gz chromium_src-c99278009759d8b7ee79d35af48889f8b292bce6.tar.bz2 |
Framework to allow Chromoting host to respect NAT traversal policy in linux.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7599017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue/jingle_info_request.cc')
-rw-r--r-- | remoting/jingle_glue/jingle_info_request.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/remoting/jingle_glue/jingle_info_request.cc b/remoting/jingle_glue/jingle_info_request.cc index 1dabf26..2c3a39c 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 sandboxed, so + // we can let libjingle itself do the DNS resolution. + stun_hosts_.push_back(talk_base::SocketAddress(host, port)); } } } |