Chromium Code Reviews| Index: talk/app/webrtc/peerconnection.cc |
| diff --git a/talk/app/webrtc/peerconnection.cc b/talk/app/webrtc/peerconnection.cc |
| index f1ff4e6d36ee5d82ceedca1124ad3dbfa89b078b..2bc04b02c2af4780947f66b259077b1d9f3e005e 100644 |
| --- a/talk/app/webrtc/peerconnection.cc |
| +++ b/talk/app/webrtc/peerconnection.cc |
| @@ -499,7 +499,11 @@ bool ConvertRtcOptionsForOffer( |
| } |
| session_options->vad_enabled = rtc_options.voice_activity_detection; |
| - session_options->transport_options.ice_restart = rtc_options.ice_restart; |
| + session_options->audio_transport_options.ice_restart = |
| + rtc_options.ice_restart; |
| + session_options->video_transport_options.ice_restart = |
| + rtc_options.ice_restart; |
| + session_options->data_transport_options.ice_restart = rtc_options.ice_restart; |
| session_options->bundle_enabled = rtc_options.use_rtp_mux; |
| return true; |
| @@ -545,10 +549,14 @@ bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints, |
| if (FindConstraint(constraints, MediaConstraintsInterface::kIceRestart, |
| &value, &mandatory_constraints_satisfied)) { |
| - session_options->transport_options.ice_restart = value; |
| + session_options->audio_transport_options.ice_restart = value; |
| + session_options->video_transport_options.ice_restart = value; |
| + session_options->data_transport_options.ice_restart = value; |
| } else { |
| // kIceRestart defaults to false according to spec. |
| - session_options->transport_options.ice_restart = false; |
| + session_options->audio_transport_options.ice_restart = false; |
| + session_options->video_transport_options.ice_restart = false; |
| + session_options->data_transport_options.ice_restart = false; |
| } |
| if (!constraints) { |
| @@ -1054,7 +1062,8 @@ void PeerConnection::SetLocalDescription( |
| // SCTP sids. |
| rtc::SSLRole role; |
| if (session_->data_channel_type() == cricket::DCT_SCTP && |
| - session_->GetSslRole(&role)) { |
| + session_->data_channel() && |
|
pthatcher1
2015/12/11 03:16:09
This is duplicated a lot. Perhaps make a GetSslRo
Taylor Brandstetter
2016/01/07 22:25:55
Done.
|
| + session_->GetSslRole(session_->data_channel()->transport_name(), &role)) { |
| AllocateSctpSids(role); |
| } |
| @@ -1132,7 +1141,8 @@ void PeerConnection::SetRemoteDescription( |
| // SCTP sids. |
| rtc::SSLRole role; |
| if (session_->data_channel_type() == cricket::DCT_SCTP && |
| - session_->GetSslRole(&role)) { |
| + session_->data_channel() && |
| + session_->GetSslRole(session_->data_channel()->transport_name(), &role)) { |
| AllocateSctpSids(role); |
| } |
| @@ -1855,7 +1865,9 @@ 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(&role) && |
| + if ((session_->data_channel() && |
| + session_->GetSslRole(session_->data_channel()->transport_name(), |
| + &role)) && |
| !sid_allocator_.AllocateSid(role, &new_config.id)) { |
| LOG(LS_ERROR) << "No id can be allocated for the SCTP data channel."; |
| return nullptr; |