Turn on IPv6 for WebRTC as default as required before ramping the experiment to 30%.

BUG=
R=juberti@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43529004

Cr-Commit-Position: refs/heads/master@{#8582}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8582 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
guoweis@webrtc.org 2015-03-03 23:27:17 +00:00
parent 369f68255f
commit bbbdeed2bf

View File

@ -341,17 +341,18 @@ bool PeerConnection::Initialize(
int portallocator_flags = port_allocator_->flags(); int portallocator_flags = port_allocator_->flags();
portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_BUNDLE | portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_BUNDLE |
cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET; cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET |
cricket::PORTALLOCATOR_ENABLE_IPV6;
bool value; bool value;
// If IPv6 flag was specified, we'll not override it by experiment. // If IPv6 flag was specified, we'll not override it by experiment.
if (FindConstraint( if (FindConstraint(
constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) { constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) {
if (value) { if (!value) {
portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_IPV6; portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
} }
} else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") ==
"Enabled") { "Disabled") {
portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_IPV6; portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
} }
port_allocator_->set_flags(portallocator_flags); port_allocator_->set_flags(portallocator_flags);