mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
Send 200Ok to server if message we can't decrypt to avoid useless retransmission + adaptation of tests to this behavior
This commit is contained in:
parent
7549c9dd37
commit
615f9d4e23
2 changed files with 6 additions and 1 deletions
|
|
@ -679,6 +679,11 @@ LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const
|
|||
} else if(retval > 0) {
|
||||
// Unable to decrypt message
|
||||
linphone_core_notify_message_received_unable_decrypt(cr->lc, cr, msg);
|
||||
reason = linphone_error_code_to_reason(retval);
|
||||
linphone_chat_message_send_delivery_notification(msg, reason);
|
||||
// return LinphoneReasonNone to avoid flexisip resending us a message we can't decrypt
|
||||
reason = LinphoneReasonNone;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1260,7 +1260,7 @@ static void lime_text_message_to_non_lime(bool_t sender_policy_mandatory, bool_t
|
|||
if (chat_room_size == 1) {
|
||||
bctbx_list_t *history = linphone_chat_room_get_history(chat_room, 0);
|
||||
LinphoneChatMessage *sent_msg = (LinphoneChatMessage *)bctbx_list_get_data(history);
|
||||
BC_ASSERT_EQUAL((int)linphone_chat_message_get_state(sent_msg), (int)LinphoneChatMessageStateNotDelivered, int, "%d");
|
||||
BC_ASSERT_EQUAL((int)linphone_chat_message_get_state(sent_msg), (int)LinphoneChatMessageStateDelivered, int, "%d");
|
||||
bctbx_list_free_with_data(history, (bctbx_list_free_func)linphone_chat_message_unref);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue