diff --git a/p2p/base/ice_transport_internal.cc b/p2p/base/ice_transport_internal.cc index 0dc7e50af2..15da627202 100644 --- a/p2p/base/ice_transport_internal.cc +++ b/p2p/base/ice_transport_internal.cc @@ -143,4 +143,14 @@ void IceTransportInternal::SetRemoteIceCredentials(absl::string_view ice_ufrag, SetRemoteIceParameters(IceParameters(ice_ufrag, ice_pwd, false)); } +void IceTransportInternal::AddGatheringStateCallback( + const void* removal_tag, + absl::AnyInvocable callback) { + gathering_state_callback_list_.AddReceiver(removal_tag, std::move(callback)); +} +void IceTransportInternal::RemoveGatheringStateCallback( + const void* removal_tag) { + gathering_state_callback_list_.RemoveReceivers(removal_tag); +} + } // namespace cricket diff --git a/p2p/base/ice_transport_internal.h b/p2p/base/ice_transport_internal.h index 32e913de05..78369c09d2 100644 --- a/p2p/base/ice_transport_internal.h +++ b/p2p/base/ice_transport_internal.h @@ -306,15 +306,11 @@ class RTC_EXPORT IceTransportInternal : public rtc::PacketTransportInternal { // Signal Exposed for backwards compatibility. sigslot::signal1 SignalGatheringState; + // Note: These calls must not be inlined in order to avoid linking issues. void AddGatheringStateCallback( const void* removal_tag, - absl::AnyInvocable callback) { - gathering_state_callback_list_.AddReceiver(removal_tag, - std::move(callback)); - } - void RemoveGatheringStateCallback(const void* removal_tag) { - gathering_state_callback_list_.RemoveReceivers(removal_tag); - } + absl::AnyInvocable callback); + void RemoveGatheringStateCallback(const void* removal_tag); // Handles sending and receiving of candidates. sigslot::signal2