Browse Source

Revert "adapt to the engine changes in ENGINE-959"

This reverts commit fedd2dc8d2.
pull/10/head
heck 7 months ago
parent
commit
5b0c58386e
3 changed files with 14 additions and 4 deletions
  1. +4
    -2
      src/message_cache.cc
  2. +2
    -0
      src/message_cache.hh
  3. +8
    -2
      test/framework/framework.cc

+ 4
- 2
src/message_cache.cc View File

@ -25,9 +25,10 @@ namespace pEp {
message *src,
message **dst,
stringlist_t **keylist,
PEP_rating *rating,
PEP_decrypt_flags_t *flags)
{
return message_cache.decrypt_message(session, src, dst, keylist, flags);
return message_cache.decrypt_message(session, src, dst, keylist, rating, flags);
}
PEP_STATUS MessageCache::cache_mime_encode_message(
@ -316,6 +317,7 @@ namespace pEp {
message *src,
message **dst,
stringlist_t **keylist,
PEP_rating *rating,
PEP_decrypt_flags_t *flags)
{
if (!src || cacheID(src) == "")
@ -333,7 +335,7 @@ namespace pEp {
correctAttachmentsOrder(src->attachments);
::message *_dst = nullptr;
PEP_STATUS status = ::decrypt_message(session, src, &_dst, keylist, flags);
PEP_STATUS status = ::decrypt_message(session, src, &_dst, keylist, rating, flags);
*dst = empty_message_copy(_dst, _id, true);
{


+ 2
- 0
src/message_cache.hh View File

@ -53,6 +53,7 @@ namespace pEp {
message *src,
message **dst,
stringlist_t **keylist,
PEP_rating *rating,
PEP_decrypt_flags_t *flags);
static PEP_STATUS cache_encrypt_message(
@ -97,6 +98,7 @@ namespace pEp {
message *src,
message **dst,
stringlist_t **keylist,
PEP_rating *rating,
PEP_decrypt_flags_t *flags);
PEP_STATUS encrypt_message(


+ 8
- 2
test/framework/framework.cc View File

@ -132,8 +132,15 @@ namespace pEp {
::message *_dst;
stringlist_t *keylist;
::PEP_rating rating;
::PEP_decrypt_flags_t flags = 0;
::PEP_STATUS status = ::decrypt_message(Adapter::session(), msg.get(), &_dst, &keylist, &flags);
::PEP_STATUS status = ::decrypt_message(
Adapter::session(),
msg.get(),
&_dst,
&keylist,
&rating,
&flags);
throw_status(status);
Message dst;
@ -141,7 +148,6 @@ namespace pEp {
dst = make_message(_dst);
else
dst = msg;
::PEP_rating rating = dst.get()->rating;
if (dst.get()->attachments) {
for (auto a = dst.get()->attachments; a && a->value; a = a->next) {


Loading…
Cancel
Save