Attempting to fix lingering issues with BUNDLE negotiation.
I found one additional way a crash could occur: "OnRtpTransportChanged"
being called instead of "OnDtlsTransportChanged", due to a mixup of m=
section types. I could reproduce this by:
1. Applying description with RTP data channel m= section.
2. Applying description with both a rejected RTP data channel m=
section and rejected SCTP m= section.
This is a very strange scenario, but maybe there are other ways to
reproduce that I haven't thought of.
The solution is to combine "OnRtpTransportChanged" and
"OnDtlsTransportChanged", and not do anything with the content type.
This simplifies the code a bit as well.
Bug: chromium:827917
Change-Id: If6818ea0c41573255831534060b30c76a6544e04
Reviewed-on: https://webrtc-review.googlesource.com/70360
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22893}
diff --git a/pc/peerconnection.h b/pc/peerconnection.h
index 3545479..1b00ef5 100644
--- a/pc/peerconnection.h
+++ b/pc/peerconnection.h
@@ -881,11 +881,14 @@
void DestroyBaseChannel(cricket::BaseChannel* channel);
// JsepTransportController::Observer override.
- bool OnRtpTransportChanged(const std::string& mid,
- RtpTransportInternal* rtp_transport) override;
-
- void OnDtlsTransportChanged(
+ //
+ // Called by |transport_controller_| when processing transport information
+ // from a session description, and the mapping from m= sections to transports
+ // changed (as a result of BUNDLE negotiation, or m= sections being
+ // rejected).
+ bool OnTransportChanged(
const std::string& mid,
+ RtpTransportInternal* rtp_transport,
cricket::DtlsTransportInternal* dtls_transport) override;
sigslot::signal1<DataChannel*> SignalDataChannelCreated_;