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

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

Issue 2224563004: Add signaling to support ICE renomination. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 4 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
Index: webrtc/p2p/base/port.cc
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index 98b62c4222e11eac346bfc1991599d833aeb7e70..3ab37c4d280a9fca868b570b8f47e3fe8b9de82c 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -1419,19 +1419,18 @@ void Connection::HandleRoleConflictFromPeer() {
port_->SignalRoleConflict(port_);
}
-void Connection::MaybeSetRemoteIceCredentialsAndGeneration(
- const std::string& ice_ufrag,
- const std::string& ice_pwd,
+void Connection::MaybeSetRemoteIceParametersAndGeneration(
+ const IceParameters& ice_params,
int generation) {
- if (remote_candidate_.username() == ice_ufrag &&
+ if (remote_candidate_.username() == ice_params.ufrag &&
remote_candidate_.password().empty()) {
- remote_candidate_.set_password(ice_pwd);
+ remote_candidate_.set_password(ice_params.pwd);
}
// TODO(deadbeef): A value of '0' for the generation is used for both
// generation 0 and "generation unknown". It should be changed to an
// rtc::Optional to fix this.
- if (remote_candidate_.username() == ice_ufrag &&
- remote_candidate_.password() == ice_pwd &&
+ if (remote_candidate_.username() == ice_params.ufrag &&
+ remote_candidate_.password() == ice_params.pwd &&
remote_candidate_.generation() == 0) {
remote_candidate_.set_generation(generation);
}

Powered by Google App Engine
This is Rietveld 408576698