| Index: webrtc/p2p/base/jseptransport.cc
|
| diff --git a/webrtc/p2p/base/jseptransport.cc b/webrtc/p2p/base/jseptransport.cc
|
| index abfe0449a48f93e9d5a15806133f7d17e01e43be..bf4d86c3afc85db76bd62b1fee91595c764bc6e4 100644
|
| --- a/webrtc/p2p/base/jseptransport.cc
|
| +++ b/webrtc/p2p/base/jseptransport.cc
|
| @@ -176,6 +176,11 @@ bool JsepTransport::SetLocalTransportDescription(
|
| error_desc);
|
| }
|
|
|
| + bool ice_restarting =
|
| + local_description_set_ &&
|
| + IceCredentialsChanged(local_description_->ice_ufrag,
|
| + local_description_->ice_pwd, description.ice_ufrag,
|
| + description.ice_pwd);
|
| local_description_.reset(new TransportDescription(description));
|
|
|
| rtc::SSLFingerprint* local_fp =
|
| @@ -199,11 +204,17 @@ bool JsepTransport::SetLocalTransportDescription(
|
| if (action == CA_PRANSWER || action == CA_ANSWER) {
|
| ret &= NegotiateTransportDescription(action, error_desc);
|
| }
|
| - if (ret) {
|
| - local_description_set_ = true;
|
| + if (!ret) {
|
| + return false;
|
| }
|
|
|
| - return ret;
|
| + if (needs_ice_restart_ && ice_restarting) {
|
| + needs_ice_restart_ = false;
|
| + LOG(LS_VERBOSE) << "needs-ice-restart flag cleared for transport " << mid();
|
| + }
|
| +
|
| + local_description_set_ = true;
|
| + return true;
|
| }
|
|
|
| bool JsepTransport::SetRemoteTransportDescription(
|
| @@ -233,6 +244,17 @@ bool JsepTransport::SetRemoteTransportDescription(
|
| return ret;
|
| }
|
|
|
| +void JsepTransport::SetNeedsIceRestartFlag() {
|
| + if (!needs_ice_restart_) {
|
| + needs_ice_restart_ = true;
|
| + LOG(LS_VERBOSE) << "needs-ice-restart flag set for transport " << mid();
|
| + }
|
| +}
|
| +
|
| +bool JsepTransport::NeedsIceRestart() const {
|
| + return needs_ice_restart_;
|
| +}
|
| +
|
| void JsepTransport::GetSslRole(rtc::SSLRole* ssl_role) const {
|
| RTC_DCHECK(ssl_role);
|
| *ssl_role = secure_role_;
|
|
|