Delete always-true BasicPortAllocatorSession::AddAllocatedPort argument
This is a private method, and the `prepare_address` argument was
constant true at all call sites.
Bug: None
Change-Id: Id4714ee7c154a729a6e106c29895fc760e9d0455
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228527
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34739}
diff --git a/p2p/client/basic_port_allocator.cc b/p2p/client/basic_port_allocator.cc
index 8ac505f..748be90 100644
--- a/p2p/client/basic_port_allocator.cc
+++ b/p2p/client/basic_port_allocator.cc
@@ -872,8 +872,7 @@
}
void BasicPortAllocatorSession::AddAllocatedPort(Port* port,
- AllocationSequence* seq,
- bool prepare_address) {
+ AllocationSequence* seq) {
RTC_DCHECK_RUN_ON(network_thread_);
if (!port)
return;
@@ -902,8 +901,7 @@
port->SignalPortError.connect(this, &BasicPortAllocatorSession::OnPortError);
RTC_LOG(LS_INFO) << port->ToString() << ": Added port to allocator";
- if (prepare_address)
- port->PrepareAddress();
+ port->PrepareAddress();
}
void BasicPortAllocatorSession::OnAllocationSequenceObjectsCreated() {
@@ -1440,7 +1438,7 @@
}
}
- session_->AddAllocatedPort(port.release(), this, true);
+ session_->AddAllocatedPort(port.release(), this);
}
}
@@ -1456,7 +1454,7 @@
session_->username(), session_->password(),
session_->allocator()->allow_tcp_listen());
if (port) {
- session_->AddAllocatedPort(port.release(), this, true);
+ session_->AddAllocatedPort(port.release(), this);
// Since TCPPort is not created using shared socket, `port` will not be
// added to the dequeue.
}
@@ -1485,7 +1483,7 @@
session_->allocator()->origin(),
session_->allocator()->stun_candidate_keepalive_interval());
if (port) {
- session_->AddAllocatedPort(port.release(), this, true);
+ session_->AddAllocatedPort(port.release(), this);
// Since StunPort is not created using shared socket, `port` will not be
// added to the dequeue.
}
@@ -1581,7 +1579,7 @@
}
}
RTC_DCHECK(port != NULL);
- session_->AddAllocatedPort(port.release(), this, true);
+ session_->AddAllocatedPort(port.release(), this);
}
}
diff --git a/p2p/client/basic_port_allocator.h b/p2p/client/basic_port_allocator.h
index 88758c3..3fca9be 100644
--- a/p2p/client/basic_port_allocator.h
+++ b/p2p/client/basic_port_allocator.h
@@ -227,9 +227,7 @@
void DisableEquivalentPhases(rtc::Network* network,
PortConfiguration* config,
uint32_t* flags);
- void AddAllocatedPort(Port* port,
- AllocationSequence* seq,
- bool prepare_address);
+ void AddAllocatedPort(Port* port, AllocationSequence* seq);
void OnCandidateReady(Port* port, const Candidate& c);
void OnCandidateError(Port* port, const IceCandidateErrorEvent& event);
void OnPortComplete(Port* port);