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

Unified Diff: webrtc/api/peerconnection.cc

Issue 2563153002: Implement the "needs-ice-restart" logic for SetConfiguration. (Closed)
Patch Set: Fixing signed/unsigned comparison warning. Created 4 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 | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index a47b2f2d8c55831f0ab80d4699d446d4ed3b1954..a85e6a2aa284a834dd1d4c6d8b9e286aedd359fb 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -1279,9 +1279,16 @@ bool PeerConnection::SetConfiguration(const RTCConfiguration& configuration) {
}
}
- // TODO(deadbeef): Shouldn't have to hop to the worker thread twice...
+ // TODO(deadbeef): Shouldn't have to hop to the network thread twice...
session_->SetIceConfig(session_->ParseIceConfig(configuration));
+ // As described in JSEP, calling setConfiguration with new ICE servers or
+ // candidate policy must set a "needs-ice-restart" bit so that the next offer
+ // triggers an ICE restart which will pick up the changes.
+ if (configuration.servers != configuration_.servers ||
+ configuration.type != configuration_.type) {
+ session_->SetNeedsIceRestartFlag();
+ }
configuration_ = configuration;
return true;
}
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698