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

Side by Side Diff: webrtc/p2p/base/stunport.cc

Issue 1493863002: Add logs when stun or turn host lookup is completed. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/turnport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 SendStunBindingRequest(*it); 356 SendStunBindingRequest(*it);
357 } 357 }
358 } 358 }
359 359
360 void UDPPort::ResolveStunAddress(const rtc::SocketAddress& stun_addr) { 360 void UDPPort::ResolveStunAddress(const rtc::SocketAddress& stun_addr) {
361 if (!resolver_) { 361 if (!resolver_) {
362 resolver_.reset(new AddressResolver(socket_factory())); 362 resolver_.reset(new AddressResolver(socket_factory()));
363 resolver_->SignalDone.connect(this, &UDPPort::OnResolveResult); 363 resolver_->SignalDone.connect(this, &UDPPort::OnResolveResult);
364 } 364 }
365 365
366 LOG_J(LS_INFO, this) << "Starting STUN host lookup for "
367 << stun_addr.ToSensitiveString();
366 resolver_->Resolve(stun_addr); 368 resolver_->Resolve(stun_addr);
367 } 369 }
368 370
369 void UDPPort::OnResolveResult(const rtc::SocketAddress& input, 371 void UDPPort::OnResolveResult(const rtc::SocketAddress& input,
370 int error) { 372 int error) {
371 ASSERT(resolver_.get() != NULL); 373 ASSERT(resolver_.get() != NULL);
372 374
373 rtc::SocketAddress resolved; 375 rtc::SocketAddress resolved;
374 if (error != 0 || 376 if (error != 0 ||
375 !resolver_->GetResolvedAddress(input, ip().family(), &resolved)) { 377 !resolver_->GetResolvedAddress(input, ip().family(), &resolved)) {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 const std::vector<Candidate>& existing_candidates = Candidates(); 504 const std::vector<Candidate>& existing_candidates = Candidates();
503 std::vector<Candidate>::const_iterator it = existing_candidates.begin(); 505 std::vector<Candidate>::const_iterator it = existing_candidates.begin();
504 for (; it != existing_candidates.end(); ++it) { 506 for (; it != existing_candidates.end(); ++it) {
505 if (it->address() == addr) 507 if (it->address() == addr)
506 return true; 508 return true;
507 } 509 }
508 return false; 510 return false;
509 } 511 }
510 512
511 } // namespace cricket 513 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/turnport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698