Bug 1269486: prevent JsepSession from overwritting IceControlling
MozReview-Commit-ID: 5dZNEaMh8j0
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
@@ -1266,17 +1266,19 @@ JsepSessionImpl::SetRemoteDescription(Js
nsresult
JsepSessionImpl::HandleNegotiatedSession(const UniquePtr<Sdp>& local,
const UniquePtr<Sdp>& remote)
{
bool remoteIceLite =
remote->GetAttributeList().HasAttribute(SdpAttribute::kIceLiteAttribute);
- mIceControlling = remoteIceLite || mIsOfferer;
+ if (mNegotiations == 0) {
+ mIceControlling = remoteIceLite || mIsOfferer;
+ }
const Sdp& answer = mIsOfferer ? *remote : *local;
SdpHelper::BundledMids bundledMids;
nsresult rv = mSdpHelper.GetBundledMids(answer, &bundledMids);
NS_ENSURE_SUCCESS(rv, rv);
if (mTransports.size() < local->GetMediaSectionCount()) {