CpEpEngine.cpp
changeset 240 ea67031c573f
parent 239 1435b23368a6
child 244 8c258e7d10f4
     1.1 --- a/CpEpEngine.cpp	Mon Mar 06 21:41:29 2017 +0100
     1.2 +++ b/CpEpEngine.cpp	Thu Mar 09 22:52:01 2017 +0100
     1.3 @@ -863,7 +863,7 @@
     1.4  }
     1.5  
     1.6  
     1.7 -STDMETHODIMP CpEpEngine::EncryptMessageForSelf(pEpIdentity * target_id, TextMessage * src, TextMessage * dst)
     1.8 +STDMETHODIMP CpEpEngine::EncryptMessageForSelf(pEpIdentity * target_id, TextMessage * src, TextMessage * dst, pEpEncryptFlags flags)
     1.9  {
    1.10      assert(target_id);
    1.11      assert(src);
    1.12 @@ -872,6 +872,8 @@
    1.13      if (!(target_id && src && dst))
    1.14          return E_INVALIDARG;
    1.15  
    1.16 +    PEP_encrypt_flags_t engineFlags = (PEP_encrypt_flags_t)flags;
    1.17 +
    1.18      ::pEp_identity *_target_id = new_identity(target_id);
    1.19  
    1.20      ::message *_src = text_message_to_C(src);
    1.21 @@ -880,7 +882,7 @@
    1.22      // free_message() below with a pointer to random garbage in
    1.23      // case of an error in encrypt_message_for_self().
    1.24      ::message *msg_dst = NULL;
    1.25 -    PEP_STATUS status = ::encrypt_message_for_self(get_session(), _target_id, _src, &msg_dst, PEP_enc_PEP);
    1.26 +    PEP_STATUS status = ::encrypt_message_for_self(get_session(), _target_id, _src, &msg_dst, PEP_enc_PEP, engineFlags);
    1.27  
    1.28      if (status == PEP_STATUS_OK)
    1.29          text_message_from_C(dst, msg_dst);