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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 raw_pooled_session->ReadyCandidates()); | 454 raw_pooled_session->ReadyCandidates()); |
455 for (PortInterface* port : allocator_sessions_.back()->ReadyPorts()) { | 455 for (PortInterface* port : allocator_sessions_.back()->ReadyPorts()) { |
456 OnPortReady(raw_pooled_session, port); | 456 OnPortReady(raw_pooled_session, port); |
457 } | 457 } |
458 if (allocator_sessions_.back()->CandidatesAllocationDone()) { | 458 if (allocator_sessions_.back()->CandidatesAllocationDone()) { |
459 OnCandidatesAllocationDone(raw_pooled_session); | 459 OnCandidatesAllocationDone(raw_pooled_session); |
460 } | 460 } |
461 } else { | 461 } else { |
462 AddAllocatorSession(allocator_->CreateSession( | 462 AddAllocatorSession(allocator_->CreateSession( |
463 transport_name(), component(), ice_ufrag_, ice_pwd_)); | 463 transport_name(), component(), ice_ufrag_, ice_pwd_)); |
| 464 LOG(LS_INFO) << "Start getting ports"; |
464 allocator_sessions_.back()->StartGettingPorts(); | 465 allocator_sessions_.back()->StartGettingPorts(); |
465 } | 466 } |
466 } | 467 } |
467 } | 468 } |
468 | 469 |
469 // A new port is available, attempt to make connections for it | 470 // A new port is available, attempt to make connections for it |
470 void P2PTransportChannel::OnPortReady(PortAllocatorSession *session, | 471 void P2PTransportChannel::OnPortReady(PortAllocatorSession *session, |
471 PortInterface* port) { | 472 PortInterface* port) { |
472 ASSERT(worker_thread_ == rtc::Thread::Current()); | 473 ASSERT(worker_thread_ == rtc::Thread::Current()); |
473 | 474 |
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1943 | 1944 |
1944 // During the initial state when nothing has been pinged yet, return the first | 1945 // During the initial state when nothing has been pinged yet, return the first |
1945 // one in the ordered |connections_|. | 1946 // one in the ordered |connections_|. |
1946 return *(std::find_if(connections_.begin(), connections_.end(), | 1947 return *(std::find_if(connections_.begin(), connections_.end(), |
1947 [conn1, conn2](Connection* conn) { | 1948 [conn1, conn2](Connection* conn) { |
1948 return conn == conn1 || conn == conn2; | 1949 return conn == conn1 || conn == conn2; |
1949 })); | 1950 })); |
1950 } | 1951 } |
1951 | 1952 |
1952 } // namespace cricket | 1953 } // namespace cricket |
OLD | NEW |