OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |