From 9a2938b24c4adc086a17bc5661dde8a26ab0d5ff Mon Sep 17 00:00:00 2001 From: Tommi Date: Wed, 22 Mar 2023 20:25:05 +0100 Subject: [PATCH] Remove HasSctpDataChannels() and just use HasDataChannels() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: none Change-Id: I372cd386ad8ec057237889860802865836baaa0c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298821 Auto-Submit: Tomas Gunnarsson Reviewed-by: Henrik Boström Commit-Queue: Henrik Boström Cr-Commit-Position: refs/heads/main@{#39650} --- pc/data_channel_controller.h | 4 ---- pc/sdp_offer_answer.cc | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pc/data_channel_controller.h b/pc/data_channel_controller.h index 28a7e16eb5..6275d6249e 100644 --- a/pc/data_channel_controller.h +++ b/pc/data_channel_controller.h @@ -91,10 +91,6 @@ class DataChannelController : public SctpDataChannelControllerInterface, bool HasDataChannels() const; // At some point in time, a data channel has existed. bool HasUsedDataChannels() const; - bool HasSctpDataChannels() const { - RTC_DCHECK_RUN_ON(signaling_thread()); - return !sctp_data_channels_.empty(); - } // Accessors DataChannelTransportInterface* data_channel_transport() const; diff --git a/pc/sdp_offer_answer.cc b/pc/sdp_offer_answer.cc index 953dc86c40..8dc6d84762 100644 --- a/pc/sdp_offer_answer.cc +++ b/pc/sdp_offer_answer.cc @@ -3265,7 +3265,7 @@ bool SdpOfferAnswerHandler::CheckIfNegotiationIsNeeded() { // 4. If connection has created any RTCDataChannels, and no m= section in // description has been negotiated yet for data, return true. - if (data_channel_controller()->HasSctpDataChannels()) { + if (data_channel_controller()->HasDataChannels()) { if (!cricket::GetFirstDataContent(description->description()->contents())) return true; }