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

Unified Diff: webrtc/p2p/base/transportcontroller.cc

Issue 2812173003: Fixing bug that results in incorrect ICE role with ICE lite endpoints. (Closed)
Patch Set: Created 3 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/transportcontroller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportcontroller.cc
diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc
index f06a180088608301c7d73560a346b42383b69481..af4857a8b779c6ab0f72aa2f782e5f2292d2307d 100644
--- a/webrtc/p2p/base/transportcontroller.cc
+++ b/webrtc/p2p/base/transportcontroller.cc
@@ -602,7 +602,11 @@ bool TransportController::SetLocalTransportDescription_n(
if (redetermine_role_on_ice_restart_ && transport->local_description() &&
IceCredentialsChanged(transport->local_description()->ice_ufrag,
transport->local_description()->ice_pwd,
- tdesc.ice_ufrag, tdesc.ice_pwd)) {
+ tdesc.ice_ufrag, tdesc.ice_pwd) &&
+ // Don't change the ICE role if the remote endpoint is ICE lite; we
+ // should always be controlling in that case.
Zhi Huang 2017/04/12 21:32:59 Extreme minor thing. Since we are changing the ice
Taylor Brandstetter 2017/04/20 07:23:53 Done.
+ (!transport->remote_description() ||
+ transport->remote_description()->ice_mode == ICEMODE_FULL)) {
IceRole new_ice_role =
(action == CA_OFFER) ? ICEROLE_CONTROLLING : ICEROLE_CONTROLLED;
SetIceRole(new_ice_role);
« no previous file with comments | « no previous file | webrtc/p2p/base/transportcontroller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698