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

Side by Side Diff: webrtc/p2p/base/turnport.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 | « webrtc/p2p/base/stunport.cc ('k') | no next file » | 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 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 // Insert the current address to prevent redirection pingpong. 606 // Insert the current address to prevent redirection pingpong.
607 attempted_server_addresses_.insert(server_address_.address); 607 attempted_server_addresses_.insert(server_address_.address);
608 return true; 608 return true;
609 } 609 }
610 610
611 void TurnPort::ResolveTurnAddress(const rtc::SocketAddress& address) { 611 void TurnPort::ResolveTurnAddress(const rtc::SocketAddress& address) {
612 if (resolver_) 612 if (resolver_)
613 return; 613 return;
614 614
615 LOG_J(LS_INFO, this) << "Starting TURN host lookup for "
616 << address.ToSensitiveString();
615 resolver_ = socket_factory()->CreateAsyncResolver(); 617 resolver_ = socket_factory()->CreateAsyncResolver();
616 resolver_->SignalDone.connect(this, &TurnPort::OnResolveResult); 618 resolver_->SignalDone.connect(this, &TurnPort::OnResolveResult);
617 resolver_->Start(address); 619 resolver_->Start(address);
618 } 620 }
619 621
620 void TurnPort::OnResolveResult(rtc::AsyncResolverInterface* resolver) { 622 void TurnPort::OnResolveResult(rtc::AsyncResolverInterface* resolver) {
621 ASSERT(resolver == resolver_); 623 ASSERT(resolver == resolver_);
622 // If DNS resolve is failed when trying to connect to the server using TCP, 624 // If DNS resolve is failed when trying to connect to the server using TCP,
623 // one of the reason could be due to DNS queries blocked by firewall. 625 // one of the reason could be due to DNS queries blocked by firewall.
624 // In such cases we will try to connect to the server with hostname, assuming 626 // In such cases we will try to connect to the server with hostname, assuming
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 // bind request as per http://tools.ietf.org/html/rfc5766#section-11.3 1429 // bind request as per http://tools.ietf.org/html/rfc5766#section-11.3
1428 if (code == STUN_ERROR_STALE_NONCE) { 1430 if (code == STUN_ERROR_STALE_NONCE) {
1429 if (port_->UpdateNonce(response)) { 1431 if (port_->UpdateNonce(response)) {
1430 // Send channel bind request with fresh nonce. 1432 // Send channel bind request with fresh nonce.
1431 SendChannelBindRequest(0); 1433 SendChannelBindRequest(0);
1432 } 1434 }
1433 } 1435 }
1434 } 1436 }
1435 1437
1436 } // namespace cricket 1438 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/stunport.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698