diff --git a/coreapi/bellesip_sal/sal_op_call_transfer.c b/coreapi/bellesip_sal/sal_op_call_transfer.c index 964a02cf2..0fad03e83 100644 --- a/coreapi/bellesip_sal/sal_op_call_transfer.c +++ b/coreapi/bellesip_sal/sal_op_call_transfer.c @@ -161,10 +161,11 @@ static void notify_last_response(SalOp *op, SalOp *newcall){ } int sal_call_notify_refer_state(SalOp *op, SalOp *newcall){ + belle_sip_dialog_state_t state; if(belle_sip_dialog_get_state(op->dialog) == BELLE_SIP_DIALOG_TERMINATED){ return 0; } - belle_sip_dialog_state_t state=newcall->dialog?belle_sip_dialog_get_state(newcall->dialog):BELLE_SIP_DIALOG_NULL; + state = newcall->dialog?belle_sip_dialog_get_state(newcall->dialog):BELLE_SIP_DIALOG_NULL; switch(state) { case BELLE_SIP_DIALOG_EARLY: send_notify_for_refer(op, 100, "Trying"); diff --git a/coreapi/chat.c b/coreapi/chat.c index 0bf27b12b..539e552cd 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -71,10 +71,11 @@ static int chat_room_compare(LinphoneChatRoom* room, const char* to) { * @return #LinphoneChatRoom where messaging can take place. */ LinphoneChatRoom* linphone_core_get_or_create_chat_room(LinphoneCore* lc, const char* to) { - if (ms_list_size(lc->chatrooms) == 0) + MSList* found; +if (ms_list_size(lc->chatrooms) == 0) return linphone_core_create_chat_room(lc, to); - MSList* found = ms_list_find_custom(lc->chatrooms, (MSCompareFunc) chat_room_compare, to); + found = ms_list_find_custom(lc->chatrooms, (MSCompareFunc) chat_room_compare, to); if (found != NULL) { return (LinphoneChatRoom*)found->data; } else {