Commit 6805fb18 authored by sergeyu's avatar sergeyu Committed by Commit bot

Fix FakePortAllocator to work with standard ICE.

Moved flags initialization from FakePortAllocatorSession into FakePortAllocator,
so that they are passed to the PortAllocatorSession ctor rather than being set via
set_flags() in the FakePortAllocatorSession ctor. This is required because some
flags (specifically PORTALLOCATOR_ENABLE_SHARED_UFRAG) are ignored if applied to
PortAllocatorSession via set_flags().

Review URL: https://codereview.chromium.org/1143893002

Cr-Commit-Position: refs/heads/master@{#330875}
parent 55191fa2
......@@ -52,11 +52,6 @@ FakePortAllocatorSession::FakePortAllocatorSession(
relay_hosts,
relay,
std::string()) {
set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
cricket::PORTALLOCATOR_ENABLE_IPV6 |
cricket::PORTALLOCATOR_DISABLE_STUN |
cricket::PORTALLOCATOR_DISABLE_RELAY);
}
FakePortAllocatorSession::~FakePortAllocatorSession() {
......@@ -106,7 +101,13 @@ FakePortAllocator::FakePortAllocator(
socket_factory.get(),
std::string()),
network_manager_(network_manager.Pass()),
socket_factory_(socket_factory.Pass()) {}
socket_factory_(socket_factory.Pass()) {
set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
cricket::PORTALLOCATOR_ENABLE_IPV6 |
cricket::PORTALLOCATOR_DISABLE_STUN |
cricket::PORTALLOCATOR_DISABLE_RELAY);
}
FakePortAllocator::~FakePortAllocator() {
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment