From d490d307875adcfcb13bc528f87f373a4b595c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Mon, 2 Mar 2015 11:43:21 +0100 Subject: [PATCH] Fix regretion on DTMF."DTMF sequence canceled if call state changed" --- coreapi/linphonecall.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 3f0be84cd..83fca175b 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1285,12 +1285,6 @@ void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const call->log->status=LinphoneCallSuccess; call->log->connected_date_time=time(NULL); break; - case LinphoneCallStreamsRunning: - if (call->dtmfs_timer!=NULL){ - /*cancelling DTMF sequence, if any*/ - linphone_call_cancel_dtmfs(call); - } - break; case LinphoneCallReleased: #ifdef ANDROID ms_message("Call [%p] releases wifi/multicast lock",call); @@ -1300,7 +1294,13 @@ void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const break; default: break; - + } + + if(cstate!=LinphoneCallStreamsRunning) { + if (call->dtmfs_timer!=NULL){ + /*cancelling DTMF sequence, if any*/ + linphone_call_cancel_dtmfs(call); + } } linphone_core_notify_call_state_changed(lc,call,cstate,message); linphone_reporting_call_state_updated(call);