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