Skip to content
Snippets Groups Projects
Commit cbca4abe authored by Sébastien Blin's avatar Sébastien Blin
Browse files

sipcall: do not reset medias for ended call

like SIPCall::onMediaUpdate, we should not restart medias if
the call is ended or a crash will typically happen with multi-device
where first device answer and hangup during the negotiation with
the other.

Change-Id: Ib6bd2a316c8f03ace25926fd20338d72613d0c54
parent b9506ca8
Branches
No related tags found
No related merge requests found
...@@ -1460,6 +1460,11 @@ SIPCall::startIceMedia() ...@@ -1460,6 +1460,11 @@ SIPCall::startIceMedia()
void void
SIPCall::onIceNegoSucceed() SIPCall::onIceNegoSucceed()
{ {
// Check if the call is already ended, so we don't need to restart medias
// This is typically the case in a multi-device context where one device
// can stop a call. So do not start medias
if (not inviteSession_ or inviteSession_->state == PJSIP_INV_STATE_DISCONNECTED or not sdp_)
return;
// Nego succeed: move to the new media transport // Nego succeed: move to the new media transport
stopAllMedia(); stopAllMedia();
{ {
...@@ -1717,7 +1722,6 @@ SIPCall::initIceMediaTransport(bool master, ...@@ -1717,7 +1722,6 @@ SIPCall::initIceMediaTransport(bool master,
call->onFailure(EIO); call->onFailure(EIO);
return; return;
} }
call->onIceNegoSucceed(); call->onIceNegoSucceed();
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment