Commit e33a9a53 authored by Simon Morlat's avatar Simon Morlat
Browse files

prevent bad usage of linphone_core_accept_call_update() in case of late sdp offer/answer

parent 177e400d
......@@ -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.",
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));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment