From 45de8b376bc48ef6952badf257242e4a9f9df42b Mon Sep 17 00:00:00 2001 From: Tomas Gunnarsson Date: Fri, 2 Apr 2021 12:33:39 +0200 Subject: [PATCH] Remove has_transport check from ReadyToUseRemoteCandidate. It turns out that this check always returns 'true' and is also not safe to do from this thread. Bug: webrtc:12635 Change-Id: Iebc0097042020707678f3a1ad9c912b227a4257c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213600 Reviewed-by: Mirko Bonadei Commit-Queue: Tommi Cr-Commit-Position: refs/heads/master@{#33626} --- pc/sdp_offer_answer.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pc/sdp_offer_answer.cc b/pc/sdp_offer_answer.cc index 6b8412caa9..293c5cb7e7 100644 --- a/pc/sdp_offer_answer.cc +++ b/pc/sdp_offer_answer.cc @@ -4521,16 +4521,7 @@ bool SdpOfferAnswerHandler::ReadyToUseRemoteCandidate( return false; } - bool has_transport = false; - cricket::ChannelInterface* channel = pc_->GetChannel(result.value()->name); - if (channel) { - has_transport = !channel->transport_name().empty(); - } else if (data_channel_controller()->data_channel_transport()) { - auto sctp_mid = pc_->sctp_mid(); - RTC_DCHECK(sctp_mid); - has_transport = (result.value()->name == *sctp_mid); - } - return has_transport; + return true; } RTCErrorOr SdpOfferAnswerHandler::FindContentInfo(