Index: webrtc/api/peerconnection.cc |
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc |
index cdf5a97b6854f31d8baa8d7f2e89f5fca2d4d09f..f8bea1bd372d22baca3e270ffca84f2b5097e2d7 100644 |
--- a/webrtc/api/peerconnection.cc |
+++ b/webrtc/api/peerconnection.cc |
@@ -38,7 +38,7 @@ |
#include "webrtc/base/trace_event.h" |
#include "webrtc/call/call.h" |
#include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
-#include "webrtc/media/sctp/sctpdataengine.h" |
+#include "webrtc/media/sctp/sctptransport.h" |
#include "webrtc/pc/channelmanager.h" |
#include "webrtc/system_wrappers/include/field_trial.h" |
@@ -652,7 +652,14 @@ bool PeerConnection::Initialize( |
std::unique_ptr<cricket::TransportController>( |
factory_->CreateTransportController( |
port_allocator_.get(), |
- configuration.redetermine_role_on_ice_restart)))); |
+ configuration.redetermine_role_on_ice_restart)), |
+#ifdef HAVE_SCTP |
+ std::unique_ptr<cricket::SctpTransportInternalFactory>( |
+ new cricket::SctpTransportFactory(factory_->network_thread())) |
+#else |
+ nullptr |
+#endif |
+ )); |
stats_.reset(new StatsCollector(this)); |
stats_collector_ = RTCStatsCollector::Create(this); |
@@ -1119,7 +1126,7 @@ void PeerConnection::SetLocalDescription( |
// SCTP sids. |
rtc::SSLRole role; |
if (session_->data_channel_type() == cricket::DCT_SCTP && |
- session_->GetSslRole(session_->data_channel(), &role)) { |
+ session_->GetSctpSslRole(&role)) { |
AllocateSctpSids(role); |
} |
@@ -1201,7 +1208,7 @@ void PeerConnection::SetRemoteDescription( |
// SCTP sids. |
rtc::SSLRole role; |
if (session_->data_channel_type() == cricket::DCT_SCTP && |
- session_->GetSslRole(session_->data_channel(), &role)) { |
+ session_->GetSctpSslRole(&role)) { |
AllocateSctpSids(role); |
} |
@@ -2143,7 +2150,7 @@ rtc::scoped_refptr<DataChannel> PeerConnection::InternalCreateDataChannel( |
if (session_->data_channel_type() == cricket::DCT_SCTP) { |
if (new_config.id < 0) { |
rtc::SSLRole role; |
- if ((session_->GetSslRole(session_->data_channel(), &role)) && |
+ if ((session_->GetSctpSslRole(&role)) && |
!sid_allocator_.AllocateSid(role, &new_config.id)) { |
LOG(LS_ERROR) << "No id can be allocated for the SCTP data channel."; |
return nullptr; |