Skip to content

Commit

Permalink
[M116] Revert mid check in SdpOfferAnswerHandler::CreateDataChannel.
Browse files Browse the repository at this point in the history
This check was added here:
  https://webrtc-review.googlesource.com/c/src/+/300544

When createOffer is used before createAnswer, this check would cause
SetupDataChannelTransport_n to not be called for the remote channel.

(cherry picked from commit 299cdc9)

Bug: webrtc:15258, chromium:1458937
Change-Id: Ifdab35d1b0260ff03fef4beff13acf8090d59d8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310460
Reviewed-by: Harald Alvestrand <[email protected]>
Commit-Queue: Tomas Gunnarsson <[email protected]>
Cr-Original-Commit-Position: refs/heads/main@{#40357}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312123
Reviewed-by: Mirko Bonadei <[email protected]>
Cr-Commit-Position: refs/branch-heads/5845@{#5}
Cr-Branched-From: f80cf81-refs/heads/main@{#40319}
  • Loading branch information
Tommi authored and WebRTC LUCI CQ committed Jul 18, 2023
1 parent aa6c910 commit 626d408
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pc/sdp_offer_answer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5145,11 +5145,7 @@ RTCError SdpOfferAnswerHandler::CreateChannels(const SessionDescription& desc) {

bool SdpOfferAnswerHandler::CreateDataChannel(const std::string& mid) {
RTC_DCHECK_RUN_ON(signaling_thread());
if (pc_->sctp_mid().has_value()) {
RTC_DCHECK_EQ(mid, *pc_->sctp_mid());
return true; // data channel already created.
}

RTC_DCHECK(!pc_->sctp_mid().has_value() || mid == pc_->sctp_mid().value());
RTC_LOG(LS_INFO) << "Creating data channel, mid=" << mid;

absl::optional<std::string> transport_name =
Expand Down

0 comments on commit 626d408

Please sign in to comment.