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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 OnCandidatesReady(raw_pooled_session, | 440 OnCandidatesReady(raw_pooled_session, |
441 raw_pooled_session->ReadyCandidates()); | 441 raw_pooled_session->ReadyCandidates()); |
442 for (PortInterface* port : allocator_sessions_.back()->ReadyPorts()) { | 442 for (PortInterface* port : allocator_sessions_.back()->ReadyPorts()) { |
443 OnPortReady(raw_pooled_session, port); | 443 OnPortReady(raw_pooled_session, port); |
444 } | 444 } |
445 if (allocator_sessions_.back()->CandidatesAllocationDone()) { | 445 if (allocator_sessions_.back()->CandidatesAllocationDone()) { |
446 OnCandidatesAllocationDone(raw_pooled_session); | 446 OnCandidatesAllocationDone(raw_pooled_session); |
447 } | 447 } |
448 } else { | 448 } else { |
449 AddAllocatorSession(allocator_->CreateSession( | 449 AddAllocatorSession(allocator_->CreateSession( |
450 SessionId(), transport_name(), component(), ice_ufrag_, ice_pwd_)); | 450 transport_name(), component(), ice_ufrag_, ice_pwd_)); |
451 allocator_sessions_.back()->StartGettingPorts(); | 451 allocator_sessions_.back()->StartGettingPorts(); |
452 } | 452 } |
453 } | 453 } |
454 } | 454 } |
455 | 455 |
456 // A new port is available, attempt to make connections for it | 456 // A new port is available, attempt to make connections for it |
457 void P2PTransportChannel::OnPortReady(PortAllocatorSession *session, | 457 void P2PTransportChannel::OnPortReady(PortAllocatorSession *session, |
458 PortInterface* port) { | 458 PortInterface* port) { |
459 ASSERT(worker_thread_ == rtc::Thread::Current()); | 459 ASSERT(worker_thread_ == rtc::Thread::Current()); |
460 | 460 |
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1929 | 1929 |
1930 // During the initial state when nothing has been pinged yet, return the first | 1930 // During the initial state when nothing has been pinged yet, return the first |
1931 // one in the ordered |connections_|. | 1931 // one in the ordered |connections_|. |
1932 return *(std::find_if(connections_.begin(), connections_.end(), | 1932 return *(std::find_if(connections_.begin(), connections_.end(), |
1933 [conn1, conn2](Connection* conn) { | 1933 [conn1, conn2](Connection* conn) { |
1934 return conn == conn1 || conn == conn2; | 1934 return conn == conn1 || conn == conn2; |
1935 })); | 1935 })); |
1936 } | 1936 } |
1937 | 1937 |
1938 } // namespace cricket | 1938 } // namespace cricket |
OLD | NEW |