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

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

Issue 2324853002: Adding logs to track potential cause of not starting port allocation.
Patch Set: Remove the ufrag pwd logging in transportcontroller because they are logged in p2ptransportchannel 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
« no previous file with comments | « no previous file | webrtc/p2p/base/transportcontroller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 << " has more than 1 connection."; 303 << " has more than 1 connection.";
304 return TransportChannelState::STATE_CONNECTING; 304 return TransportChannelState::STATE_CONNECTING;
305 } 305 }
306 } 306 }
307 307
308 return TransportChannelState::STATE_COMPLETED; 308 return TransportChannelState::STATE_COMPLETED;
309 } 309 }
310 310
311 void P2PTransportChannel::SetIceParameters(const IceParameters& ice_params) { 311 void P2PTransportChannel::SetIceParameters(const IceParameters& ice_params) {
312 ASSERT(worker_thread_ == rtc::Thread::Current()); 312 ASSERT(worker_thread_ == rtc::Thread::Current());
313 LOG(LS_INFO) << "Set ICE ufrag: " << ice_params.ufrag
314 << " pwd: " << ice_params.pwd << " on transport "
315 << transport_name();
313 ice_parameters_ = ice_params; 316 ice_parameters_ = ice_params;
314 // Note: Candidate gathering will restart when MaybeStartGathering is next 317 // Note: Candidate gathering will restart when MaybeStartGathering is next
315 // called. 318 // called.
316 } 319 }
317 320
318 void P2PTransportChannel::SetRemoteIceParameters( 321 void P2PTransportChannel::SetRemoteIceParameters(
319 const IceParameters& ice_params) { 322 const IceParameters& ice_params) {
320 ASSERT(worker_thread_ == rtc::Thread::Current()); 323 ASSERT(worker_thread_ == rtc::Thread::Current());
321 LOG(LS_INFO) << "Remote supports ICE renomination ? " 324 LOG(LS_INFO) << "Remote supports ICE renomination ? "
322 << ice_params.renomination; 325 << ice_params.renomination;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 << static_cast<int>(config_.default_nomination_mode); 430 << static_cast<int>(config_.default_nomination_mode);
428 } 431 }
429 } 432 }
430 433
431 const IceConfig& P2PTransportChannel::config() const { 434 const IceConfig& P2PTransportChannel::config() const {
432 return config_; 435 return config_;
433 } 436 }
434 437
435 void P2PTransportChannel::MaybeStartGathering() { 438 void P2PTransportChannel::MaybeStartGathering() {
436 if (ice_parameters_.ufrag.empty() || ice_parameters_.pwd.empty()) { 439 if (ice_parameters_.ufrag.empty() || ice_parameters_.pwd.empty()) {
440 LOG(LS_ERROR) << "Cannot gather candidates because ICE parameters are empty"
441 << " ufrag: " << ice_parameters_.ufrag
442 << " pwd: " << ice_parameters_.pwd;
437 return; 443 return;
438 } 444 }
439 // Start gathering if we never started before, or if an ICE restart occurred. 445 // Start gathering if we never started before, or if an ICE restart occurred.
440 if (allocator_sessions_.empty() || 446 if (allocator_sessions_.empty() ||
441 IceCredentialsChanged(allocator_sessions_.back()->ice_ufrag(), 447 IceCredentialsChanged(allocator_sessions_.back()->ice_ufrag(),
442 allocator_sessions_.back()->ice_pwd(), 448 allocator_sessions_.back()->ice_pwd(),
443 ice_parameters_.ufrag, ice_parameters_.pwd)) { 449 ice_parameters_.ufrag, ice_parameters_.pwd)) {
444 if (gathering_state_ != kIceGatheringGathering) { 450 if (gathering_state_ != kIceGatheringGathering) {
445 gathering_state_ = kIceGatheringGathering; 451 gathering_state_ = kIceGatheringGathering;
446 SignalGatheringState(this); 452 SignalGatheringState(this);
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 1967
1962 // During the initial state when nothing has been pinged yet, return the first 1968 // During the initial state when nothing has been pinged yet, return the first
1963 // one in the ordered |connections_|. 1969 // one in the ordered |connections_|.
1964 return *(std::find_if(connections_.begin(), connections_.end(), 1970 return *(std::find_if(connections_.begin(), connections_.end(),
1965 [conn1, conn2](Connection* conn) { 1971 [conn1, conn2](Connection* conn) {
1966 return conn == conn1 || conn == conn2; 1972 return conn == conn1 || conn == conn2;
1967 })); 1973 }));
1968 } 1974 }
1969 1975
1970 } // namespace cricket 1976 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/transportcontroller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698