diff --git a/coreapi/lime.c b/coreapi/lime.c index 771f46384..b19eae8be 100644 --- a/coreapi/lime.c +++ b/coreapi/lime.c @@ -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; }