Call HasUsedDataChannels() instead of HasDataChannels.

...when checking if negotiation is needed.

I noticed this call site after we recently updated PeerConnection here:
https://webrtc-review.googlesource.com/c/src/+/297860

Bug: chromium:1423562
Change-Id: Id37c938d731eadfccff44c95ef757a3cabd64936
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299480
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39720}
This commit is contained in:
Tommi 2023-03-30 01:09:45 +02:00 committed by WebRTC LUCI CQ
parent 4f7ade5c58
commit 91160efca4

View File

@ -3311,7 +3311,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()->HasDataChannels()) {
if (data_channel_controller()->HasUsedDataChannels()) {
if (!cricket::GetFirstDataContent(description->description()->contents()))
return true;
}