Commit ebb36d6d authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Added logs related to incoming message decryption process

parent 0566b2b1
......@@ -805,6 +805,8 @@ int lime_im_encryption_engine_process_incoming_message_cb(LinphoneImEncryptionEn
char *peerUri = NULL;
char *selfUri = NULL;
ms_debug("Content type is known (%s), try to decrypt it", linphone_chat_message_get_content_type(msg));
zrtp_cache_db = linphone_core_get_zrtp_cache_db(lc);
if (zrtp_cache_db == NULL) {
ms_warning("Unable to load content of ZRTP ZID cache to decrypt message");
......@@ -827,9 +829,11 @@ int lime_im_encryption_engine_process_incoming_message_cb(LinphoneImEncryptionEn
linphone_chat_message_set_text(msg, (char *)decrypted_body);
ms_free(decrypted_body);
if (decrypted_content_type != NULL) {
ms_debug("Decrypted content type is ", decrypted_content_type);
linphone_chat_message_set_content_type(msg, decrypted_content_type);
ms_free(decrypted_content_type);
} else {
ms_debug("Decrypted content type is unknown, use plain/text or application/vnd.gsma.rcs-ft-http+xml");
if (strcmp("application/cipher.vnd.gsma.rcs-ft-http+xml", linphone_chat_message_get_content_type(msg)) == 0) {
linphone_chat_message_set_content_type(msg, "application/vnd.gsma.rcs-ft-http+xml");
} else {
......@@ -837,6 +841,8 @@ int lime_im_encryption_engine_process_incoming_message_cb(LinphoneImEncryptionEn
}
}
}
} else {
ms_message("Content type is unknown (%s), don't try to decrypt it", linphone_chat_message_get_content_type(msg));
}
return errcode;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment