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}
This commit is contained in:
Niels Möller 2021-08-12 14:16:53 +02:00 committed by WebRTC LUCI CQ
parent 69dd142797
commit aa918e0111
2 changed files with 7 additions and 11 deletions

View File

@ -872,8 +872,7 @@ void BasicPortAllocatorSession::DisableEquivalentPhases(
}
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 @@ void BasicPortAllocatorSession::AddAllocatedPort(Port* port,
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 @@ void AllocationSequence::CreateUDPPorts() {
}
}
session_->AddAllocatedPort(port.release(), this, true);
session_->AddAllocatedPort(port.release(), this);
}
}
@ -1456,7 +1454,7 @@ void AllocationSequence::CreateTCPPorts() {
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 @@ void AllocationSequence::CreateStunPorts() {
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 @@ void AllocationSequence::CreateTurnPort(const RelayServerConfig& config) {
}
}
RTC_DCHECK(port != NULL);
session_->AddAllocatedPort(port.release(), this, true);
session_->AddAllocatedPort(port.release(), this);
}
}

View File

@ -227,9 +227,7 @@ class RTC_EXPORT BasicPortAllocatorSession : public PortAllocatorSession {
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);