Do not define a variable in the middle of a block of code.

This commit is contained in:
Ghislain MARY 2013-03-20 15:48:48 +01:00
parent ba3a2f0549
commit dbc944a5f4

View file

@ -2117,8 +2117,9 @@ void linphone_core_iterate(LinphoneCore *lc){
if (call->state==LinphoneCallIncomingReceived){
ms_message("incoming call ringing for %i seconds",elapsed);
if (elapsed>lc->sip_conf.inc_timeout){
LinphoneReason decline_reason;
ms_message("incoming call timeout (%i)",lc->sip_conf.inc_timeout);
LinphoneReason decline_reason=lc->current_call ? LinphoneReasonBusy : LinphoneReasonDeclined;
decline_reason=lc->current_call ? LinphoneReasonBusy : LinphoneReasonDeclined;
call->log->status=LinphoneCallMissed;
call->reason=LinphoneReasonNotAnswered;
linphone_core_decline_call(lc,call,decline_reason);