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

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

Issue 2152963003: Restore the behavior where an ICE restart redetermines the ICE role. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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 | « webrtc/p2p/base/transport.h ('k') | 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 2860f87b6dbba1fad0db69211fbdb4ec35d18ebd..b5021cceccb73c18592b7a8f8bd7d97861e09cce 100644
--- a/webrtc/p2p/base/transportcontroller.cc
+++ b/webrtc/p2p/base/transportcontroller.cc
@@ -446,6 +446,21 @@ bool TransportController::SetLocalTransportDescription_n(
return true;
}
+ // Older versions of Chrome expect the ICE role to be re-determined when an
+ // ICE restart occurs, and also don't perform conflict resolution correctly,
+ // so for now we can't safely stop doing this.
+ // See: https://bugs.chromium.org/p/chromium/issues/detail?id=628676
+ // TODO(deadbeef): Remove this when these old versions of Chrome reach a low
+ // enough population.
+ if (transport->local_description() &&
+ IceCredentialsChanged(transport->local_description()->ice_ufrag,
+ transport->local_description()->ice_pwd,
+ tdesc.ice_ufrag, tdesc.ice_pwd)) {
+ IceRole new_ice_role =
+ (action == CA_OFFER) ? ICEROLE_CONTROLLING : ICEROLE_CONTROLLED;
+ SetIceRole(new_ice_role);
+ }
+
return transport->SetLocalTransportDescription(tdesc, action, err);
}
« no previous file with comments | « webrtc/p2p/base/transport.h ('k') | webrtc/p2p/base/transportcontroller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698