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

Side by Side Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 2267163002: Add logs and small change in BasicPortAllocator (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Log allocating ports only if the network list is not empty. Created 4 years, 3 months 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/client/basicportallocator.h » ('j') | webrtc/p2p/client/basicportallocator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698