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

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

Issue 1868353004: Update prflx candidates' generation when setting ICE credentials. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Only need to pass in the last ICE params and the generation. 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 | « webrtc/p2p/base/port.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/port.cc
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index d26a9302a8af7ba55bc98b3a979a331a6337ec71..0238aa2ba207ac7b4478f2ad40797d562c1bcea4 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -1298,12 +1298,22 @@ void Connection::HandleRoleConflictFromPeer() {
port_->SignalRoleConflict(port_);
}
-void Connection::MaybeSetRemoteIceCredentials(const std::string& ice_ufrag,
- const std::string& ice_pwd) {
+void Connection::MaybeSetRemoteIceCredentialsAndGeneration(
+ const std::string& ice_ufrag,
+ const std::string& ice_pwd,
+ int generation) {
if (remote_candidate_.username() == ice_ufrag &&
remote_candidate_.password().empty()) {
remote_candidate_.set_password(ice_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 &&
+ remote_candidate_.generation() == 0) {
+ remote_candidate_.set_generation(generation);
+ }
}
void Connection::MaybeUpdatePeerReflexiveCandidate(
« no previous file with comments | « webrtc/p2p/base/port.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698