mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
prevent bad usage of linphone_core_accept_call_update() in case of late sdp offer/answer
This commit is contained in:
parent
177e400ddd
commit
e33a9a53ef
1 changed files with 5 additions and 1 deletions
|
|
@ -3561,11 +3561,15 @@ int linphone_core_start_accept_call_update(LinphoneCore *lc, LinphoneCall *call,
|
|||
* @return 0 if successful, -1 otherwise (actually when this function call is performed outside ot #LinphoneCallUpdatedByRemote state).
|
||||
**/
|
||||
int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
|
||||
if (call->state!=LinphoneCallUpdatedByRemote){
|
||||
if (call->state != LinphoneCallUpdatedByRemote){
|
||||
ms_error("linphone_core_accept_update(): invalid state %s to call this function.",
|
||||
linphone_call_state_to_string(call->state));
|
||||
return -1;
|
||||
}
|
||||
if (call->expect_media_in_ack){
|
||||
ms_error("linphone_core_accept_call_update() is not possible during a late offer incoming reINVITE (INVITE without SDP)");
|
||||
return -1;
|
||||
}
|
||||
return _linphone_core_accept_call_update(lc, call, params, call->prevstate, linphone_call_state_to_string(call->prevstate));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue