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

Unified Diff: talk/app/webrtc/webrtcsession.cc

Issue 1496693002: Discard old-generation candidates when ICE restarts (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years 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 | talk/app/webrtc/webrtcsession_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/webrtcsession.cc
diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc
index ec0456f7cb9f1f8743dabc4794f181353369f439..be12c24ab2a09eba3ef1b4db958dea89bafc2662 100644
--- a/talk/app/webrtc/webrtcsession.cc
+++ b/talk/app/webrtc/webrtcsession.cc
@@ -492,9 +492,13 @@ class IceRestartAnswerLatch {
}
}
+ // This method has two purposes: 1. Return whether |new_desc| requests
+ // an ICE restart (i.e., new ufrag/pwd). 2. If it requests an ICE restart
+ // and it is an OFFER, remember this in |ice_restart_| so that the next
+ // Local Answer will be created with new ufrag and pwd.
bool CheckForRemoteIceRestart(const SessionDescriptionInterface* old_desc,
const SessionDescriptionInterface* new_desc) {
- if (!old_desc || new_desc->type() != SessionDescriptionInterface::kOffer) {
+ if (!old_desc) {
return false;
}
const SessionDescription* new_sd = new_desc->description();
@@ -520,7 +524,9 @@ class IceRestartAnswerLatch {
new_transport_desc->ice_ufrag,
new_transport_desc->ice_pwd)) {
LOG(LS_INFO) << "Remote peer request ice restart.";
- ice_restart_ = true;
+ if (new_desc->type() == SessionDescriptionInterface::kOffer) {
+ ice_restart_ = true;
+ }
return true;
}
}
« no previous file with comments | « no previous file | talk/app/webrtc/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698