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

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

Issue 1308753003: Revert "Reland "Remove GICE (gone forever!) and PORTALLOCATOR_ENABLE_SHARED_UFRAG (enabled forever)… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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/portallocator.cc
diff --git a/webrtc/p2p/base/portallocator.cc b/webrtc/p2p/base/portallocator.cc
index 76455b506e220ad8e3d188b827111ca19e7b12e3..35edade13c95325bb1011b0b041b0917e63f3773 100644
--- a/webrtc/p2p/base/portallocator.cc
+++ b/webrtc/p2p/base/portallocator.cc
@@ -21,8 +21,11 @@ PortAllocatorSession::PortAllocatorSession(const std::string& content_name,
component_(component),
flags_(flags),
generation_(0),
- username_(ice_ufrag),
- password_(ice_pwd) {
+ // If PORTALLOCATOR_ENABLE_SHARED_UFRAG flag is not enabled, ignore the
+ // incoming ufrag and pwd, which will cause each Port to generate one
+ // by itself.
+ username_(flags_ & PORTALLOCATOR_ENABLE_SHARED_UFRAG ? ice_ufrag : ""),
+ password_(flags_ & PORTALLOCATOR_ENABLE_SHARED_UFRAG ? ice_pwd : "") {
}
PortAllocatorSession* PortAllocator::CreateSession(

Powered by Google App Engine
This is Rietveld 408576698