From 1732df61294d85fc8e4452985e775099e150afe4 Mon Sep 17 00:00:00 2001 From: "braveyao@webrtc.org" Date: Mon, 27 Oct 2014 03:01:37 +0000 Subject: [PATCH] Use flags set by the port allocator. Currently, port allocator flags are ignored. This is inconvenient if you want to have your own PortAllocatorFactory subclass. BUG=webrtc:3958 R=juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/29919004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7524 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/app/webrtc/peerconnection.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/talk/app/webrtc/peerconnection.cc b/talk/app/webrtc/peerconnection.cc index d939f98b3e..f45ce0bf66 100644 --- a/talk/app/webrtc/peerconnection.cc +++ b/talk/app/webrtc/peerconnection.cc @@ -350,9 +350,10 @@ bool PeerConnection::DoInitialize( // To handle both internal and externally created port allocator, we will // enable BUNDLE here. - int portallocator_flags = cricket::PORTALLOCATOR_ENABLE_BUNDLE | - cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | - cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET; + int portallocator_flags = port_allocator_->flags(); + portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_BUNDLE | + cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | + cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET; bool value; // If IPv6 flag was specified, we'll not override it by experiment. if (FindConstraint(