| Index: webrtc/api/peerconnection.cc
|
| diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
|
| index a47b2f2d8c55831f0ab80d4699d446d4ed3b1954..d0cdb036597025cd9c609b3f28e1a1f9600c4410 100644
|
| --- a/webrtc/api/peerconnection.cc
|
| +++ b/webrtc/api/peerconnection.cc
|
| @@ -1268,6 +1268,14 @@ PeerConnectionInterface::RTCConfiguration PeerConnection::GetConfiguration() {
|
|
|
| bool PeerConnection::SetConfiguration(const RTCConfiguration& configuration) {
|
| TRACE_EVENT0("webrtc", "PeerConnection::SetConfiguration");
|
| +
|
| + if (session_->local_description() &&
|
| + configuration.ice_candidate_pool_size !=
|
| + configuration_.ice_candidate_pool_size) {
|
| + LOG(LS_ERROR) << "Can't change candidate pool size after calling "
|
| + "SetLocalDescription.";
|
| + return false;
|
| + }
|
| // TODO(deadbeef): Return false and log an error if there are any unsupported
|
| // modifications.
|
| if (port_allocator_) {
|
| @@ -1275,6 +1283,7 @@ bool PeerConnection::SetConfiguration(const RTCConfiguration& configuration) {
|
| RTC_FROM_HERE,
|
| rtc::Bind(&PeerConnection::ReconfigurePortAllocator_n, this,
|
| configuration))) {
|
| + LOG(LS_ERROR) << "Failed to apply configuration to PortAllocator.";
|
| return false;
|
| }
|
| }
|
| @@ -2359,10 +2368,9 @@ bool PeerConnection::ReconfigurePortAllocator_n(
|
| ConvertIceTransportTypeToCandidateFilter(configuration.type));
|
| // Call this last since it may create pooled allocator sessions using the
|
| // candidate filter set above.
|
| - port_allocator_->SetConfiguration(stun_servers, turn_servers,
|
| - configuration.ice_candidate_pool_size,
|
| - configuration.prune_turn_ports);
|
| - return true;
|
| + return port_allocator_->SetConfiguration(
|
| + stun_servers, turn_servers, configuration.ice_candidate_pool_size,
|
| + configuration.prune_turn_ports);
|
| }
|
|
|
| bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file,
|
|
|