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

Unified Diff: webrtc/p2p/base/faketransportcontroller.h

Issue 1844133002: Remove the dead code in Transport::ConnectChannels (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Modified the FakeTransportController Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/transport.cc » ('j') | webrtc/p2p/base/transport.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/faketransportcontroller.h
diff --git a/webrtc/p2p/base/faketransportcontroller.h b/webrtc/p2p/base/faketransportcontroller.h
index a267f209670bf6dc67a1e4859215e491574f22df..61f84a25dff263cbb3e743c34127be2a8d35382f 100644
--- a/webrtc/p2p/base/faketransportcontroller.h
+++ b/webrtc/p2p/base/faketransportcontroller.h
@@ -554,8 +554,19 @@ class FakeTransportController : public TransportController {
}
void ConnectChannels_w() {
+ TransportDescription faketransport_desc(
+ std::vector<std::string>(),
+ rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH),
+ rtc::CreateRandomString(cricket::ICE_PWD_LENGTH), cricket::ICEMODE_FULL,
+ cricket::CONNECTIONROLE_NONE, nullptr);
for (auto& kv : transports()) {
FakeTransport* transport = static_cast<FakeTransport*>(kv.second);
+ // Set local transport description for FakeTransport before connecting.
+ // Otherwise, the RTC_CHECK in Transport.ConnectChannel will fail.
+ if (!transport->local_description()) {
+ transport->SetLocalTransportDescription(faketransport_desc,
+ cricket::CA_OFFER, nullptr);
+ }
transport->ConnectChannels();
transport->MaybeStartGathering();
}
« no previous file with comments | « no previous file | webrtc/p2p/base/transport.cc » ('j') | webrtc/p2p/base/transport.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698