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

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

Issue 2324853002: Adding logs to track potential cause of not starting port allocation.
Patch Set: Log set local description as verbose in transportcontroller and log SetICEParameters in p2ptranspor… 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 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // enough population. 467 // enough population.
468 if (redetermine_role_on_ice_restart_ && transport->local_description() && 468 if (redetermine_role_on_ice_restart_ && transport->local_description() &&
469 IceCredentialsChanged(transport->local_description()->ice_ufrag, 469 IceCredentialsChanged(transport->local_description()->ice_ufrag,
470 transport->local_description()->ice_pwd, 470 transport->local_description()->ice_pwd,
471 tdesc.ice_ufrag, tdesc.ice_pwd)) { 471 tdesc.ice_ufrag, tdesc.ice_pwd)) {
472 IceRole new_ice_role = 472 IceRole new_ice_role =
473 (action == CA_OFFER) ? ICEROLE_CONTROLLING : ICEROLE_CONTROLLED; 473 (action == CA_OFFER) ? ICEROLE_CONTROLLING : ICEROLE_CONTROLLED;
474 SetIceRole(new_ice_role); 474 SetIceRole(new_ice_role);
475 } 475 }
476 476
477 LOG(LS_VERBOSE) << "Set local transport description on " << transport_name
478 << " with ufrag " << tdesc.ice_ufrag
479 << " pwd " << tdesc.ice_pwd;
477 return transport->SetLocalTransportDescription(tdesc, action, err); 480 return transport->SetLocalTransportDescription(tdesc, action, err);
478 } 481 }
479 482
480 bool TransportController::SetRemoteTransportDescription_n( 483 bool TransportController::SetRemoteTransportDescription_n(
481 const std::string& transport_name, 484 const std::string& transport_name,
482 const TransportDescription& tdesc, 485 const TransportDescription& tdesc,
483 ContentAction action, 486 ContentAction action,
484 std::string* err) { 487 std::string* err) {
485 RTC_DCHECK(network_thread_->IsCurrent()); 488 RTC_DCHECK(network_thread_->IsCurrent());
486 489
487 Transport* transport = GetTransport_n(transport_name); 490 Transport* transport = GetTransport_n(transport_name);
488 if (!transport) { 491 if (!transport) {
489 // If we didn't find a transport, that's not an error; 492 // If we didn't find a transport, that's not an error;
490 // it could have been deleted as a result of bundling. 493 // it could have been deleted as a result of bundling.
491 // TODO(deadbeef): Make callers smarter so they won't attempt to set a 494 // TODO(deadbeef): Make callers smarter so they won't attempt to set a
492 // description on a deleted transport. 495 // description on a deleted transport.
493 return true; 496 return true;
494 } 497 }
495 498
Taylor Brandstetter 2016/09/14 20:40:27 nit: If we log setting the local transport descrip
honghaiz3 2016/09/15 17:38:29 Done.
496 return transport->SetRemoteTransportDescription(tdesc, action, err); 499 return transport->SetRemoteTransportDescription(tdesc, action, err);
497 } 500 }
498 501
499 void TransportController::MaybeStartGathering_n() { 502 void TransportController::MaybeStartGathering_n() {
500 for (const auto& kv : transports_) { 503 for (const auto& kv : transports_) {
501 kv.second->MaybeStartGathering(); 504 kv.second->MaybeStartGathering();
502 } 505 }
503 } 506 }
504 507
505 bool TransportController::AddRemoteCandidates_n( 508 bool TransportController::AddRemoteCandidates_n(
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, 699 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE,
697 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); 700 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state));
698 } 701 }
699 } 702 }
700 703
701 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) { 704 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) {
702 SignalDtlsHandshakeError(error); 705 SignalDtlsHandshakeError(error);
703 } 706 }
704 707
705 } // namespace cricket 708 } // namespace cricket
OLDNEW
« webrtc/p2p/base/p2ptransportchannel.cc ('K') | « webrtc/p2p/base/p2ptransportchannel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698