From 2675b25f45146ae381dfc8c8381fb3d9b5bd4335 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 19 Dec 2016 15:28:53 +0100 Subject: [PATCH] Do not go back to previous state when in a stable state if SDP missing --- coreapi/callbacks.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 5557f1962..a34fcb0f7 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -603,8 +603,16 @@ static void process_call_accepted(LinphoneCore *lc, LinphoneCall *call, SalOp *o break; /*otherwise we are able to resume previous state*/ default: - ms_message("Incompatible SDP answer received, restoring previous state [%s]",linphone_call_state_to_string(call->prevstate)); - linphone_call_set_state(call,call->prevstate,_("Incompatible media parameters.")); + ms_error("Incompatible SDP answer received"); + switch(call->state) { + case LinphoneCallPausedByRemote: + case LinphoneCallPaused: + case LinphoneCallStreamsRunning: + default: + ms_message("Incompatible SDP answer received, restoring previous state [%s]",linphone_call_state_to_string(call->prevstate)); + linphone_call_set_state(call,call->prevstate,_("Incompatible media parameters.")); + break; + } break; } }