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

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: Re-enable the disabled test condition. 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
« webrtc/p2p/base/p2ptransportchannel.cc ('K') | « 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..c66c02b966fa2f006abf8b9a61aa315f495bd72a 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -1298,11 +1298,19 @@ void Connection::HandleRoleConflictFromPeer() {
port_->SignalRoleConflict(port_);
}
-void Connection::MaybeSetRemoteIceCredentials(const std::string& ice_ufrag,
- const std::string& ice_pwd) {
- if (remote_candidate_.username() == ice_ufrag &&
- remote_candidate_.password().empty()) {
- remote_candidate_.set_password(ice_pwd);
+void Connection::MaybeSetRemoteIceCredentialsAndGeneration(
+ const std::vector<IceParameters>& remote_ice_parameters) {
+ int generation = 0;
+ for (const IceParameters& params : remote_ice_parameters) {
+ if (remote_candidate_.username() == params.ufrag &&
+ remote_candidate_.password().empty()) {
+ remote_candidate_.set_password(params.pwd);
pthatcher1 2016/04/12 18:47:39 Should we also set_generation() here?
Taylor Brandstetter 2016/04/12 21:33:46 I guess it would be a small optimization. Or do we
pthatcher1 2016/04/12 22:39:53 Oh, I see. In the first case, you end up doing th
+ }
+ if (remote_candidate_.username() == params.ufrag &&
+ remote_candidate_.password() == params.pwd) {
+ remote_candidate_.set_generation(generation);
+ }
+ ++generation;
}
}
« webrtc/p2p/base/p2ptransportchannel.cc ('K') | « webrtc/p2p/base/port.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698