bug fixing
authorVolker Birk <vb@pep-project.org>
Tue, 12 May 2015 14:13:52 +0200
changeset 20f77dd13806ff
parent 19 3cfb847e13cd
child 21 775a847a9d09
bug fixing
CpEpEngine.cpp
TextMessage.cpp
pEpCOMServerAdapter.idl
pEpCOMServerAdapter_i.c
pEpCOMServerAdapter_i.h
     1.1 --- a/CpEpEngine.cpp	Fri May 08 10:07:08 2015 +0200
     1.2 +++ b/CpEpEngine.cpp	Tue May 12 14:13:52 2015 +0200
     1.3 @@ -905,8 +905,8 @@
     1.4      ::stringlist_t *_keylist;
     1.5      ::PEP_color _rating;
     1.6  
     1.7 -    PEP_STATUS status = ::decrypt_message(get_session(), _src->msg, PEP_MIME_none, &msg_dst, &_keylist, &_rating);
     1.8 -    if (status != PEP_STATUS_OK && (status < PEP_UNENCRYPTED || status > PEP_CANNOT_DECRYPT_UNKNOWN))
     1.9 +    PEP_STATUS status = ::decrypt_message(get_session(), _src->msg, &msg_dst, &_keylist, &_rating);
    1.10 +    if (status != PEP_STATUS_OK)
    1.11          return FAIL(L"decrypt message failed");
    1.12  
    1.13      if (msg_dst) {
     2.1 --- a/TextMessage.cpp	Fri May 08 10:07:08 2015 +0200
     2.2 +++ b/TextMessage.cpp	Tue May 12 14:13:52 2015 +0200
     2.3 @@ -731,6 +731,9 @@
     2.4          return E_OUTOFMEMORY;
     2.5      }
     2.6  
     2.7 +    if (msg->attachments == NULL)
     2.8 +        msg->attachments = blob;
     2.9 +
    2.10      return S_OK;
    2.11  }
    2.12  
     3.1 --- a/pEpCOMServerAdapter.idl	Fri May 08 10:07:08 2015 +0200
     3.2 +++ b/pEpCOMServerAdapter.idl	Tue May 12 14:13:52 2015 +0200
     3.3 @@ -210,8 +210,9 @@
     3.4  
     3.5      typedef enum _pEp_color {
     3.6          pEp_rating_undefined = 0,
     3.7 +        pEp_rating_cannot_decrypt,
     3.8 +        pEp_rating_have_no_key,
     3.9          pEp_rating_unencrypted,
    3.10 -        pEp_rating_cannot_decrypt,
    3.11          pEp_rating_unreliable,
    3.12          pEp_rating_reliable,
    3.13          pEp_rating_yellow = pEp_rating_reliable,
    3.14 @@ -226,7 +227,7 @@
    3.15      } pEp_color;
    3.16  
    3.17      HRESULT encrypt_message([in] ITextMessage *src, [out] ITextMessage ** dst, [in, optional] SAFEARRAY(BSTR) extra);
    3.18 -    HRESULT decrypt_message([in] ITextMessage *src, [out] ITextMessage ** dst, [out] SAFEARRAY(BSTR) *keylist, [out] pEp_color *rating);
    3.19 +    HRESULT decrypt_message([in] ITextMessage *src, [out] ITextMessage ** dst, [out] SAFEARRAY(BSTR) *keylist, [out, retval] pEp_color *rating);
    3.20      HRESULT outgoing_message_color([in] ITextMessage *msg, [out, retval] pEp_color * pVal);
    3.21      HRESULT identity_color([in] struct pEp_identity_s * ident, [out, retval] pEp_color * pVal);
    3.22  };
     4.1 --- a/pEpCOMServerAdapter_i.c	Fri May 08 10:07:08 2015 +0200
     4.2 +++ b/pEpCOMServerAdapter_i.c	Tue May 12 14:13:52 2015 +0200
     4.3 @@ -6,7 +6,7 @@
     4.4  
     4.5  
     4.6   /* File created by MIDL compiler version 8.00.0603 */
     4.7 -/* at Wed May 06 20:19:27 2015
     4.8 +/* at Tue May 12 13:50:45 2015
     4.9   */
    4.10  /* Compiler settings for pEpCOMServerAdapter.idl:
    4.11      Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603 
     5.1 --- a/pEpCOMServerAdapter_i.h	Fri May 08 10:07:08 2015 +0200
     5.2 +++ b/pEpCOMServerAdapter_i.h	Tue May 12 14:13:52 2015 +0200
     5.3 @@ -4,7 +4,7 @@
     5.4  
     5.5  
     5.6   /* File created by MIDL compiler version 8.00.0603 */
     5.7 -/* at Wed May 06 20:19:27 2015
     5.8 +/* at Tue May 12 13:50:45 2015
     5.9   */
    5.10  /* Compiler settings for pEpCOMServerAdapter.idl:
    5.11      Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603 
    5.12 @@ -638,9 +638,10 @@
    5.13  enum _pEp_color
    5.14      {
    5.15          pEp_rating_undefined	= 0,
    5.16 -        pEp_rating_unencrypted	= ( pEp_rating_undefined + 1 ) ,
    5.17 -        pEp_rating_cannot_decrypt	= ( pEp_rating_unencrypted + 1 ) ,
    5.18 -        pEp_rating_unreliable	= ( pEp_rating_cannot_decrypt + 1 ) ,
    5.19 +        pEp_rating_cannot_decrypt	= ( pEp_rating_undefined + 1 ) ,
    5.20 +        pEp_rating_have_no_key	= ( pEp_rating_cannot_decrypt + 1 ) ,
    5.21 +        pEp_rating_unencrypted	= ( pEp_rating_have_no_key + 1 ) ,
    5.22 +        pEp_rating_unreliable	= ( pEp_rating_unencrypted + 1 ) ,
    5.23          pEp_rating_reliable	= ( pEp_rating_unreliable + 1 ) ,
    5.24          pEp_rating_yellow	= pEp_rating_reliable,
    5.25          pEp_rating_trusted	= ( pEp_rating_yellow + 1 ) ,
    5.26 @@ -768,7 +769,7 @@
    5.27              /* [in] */ ITextMessage *src,
    5.28              /* [out] */ ITextMessage **dst,
    5.29              /* [out] */ SAFEARRAY * *keylist,
    5.30 -            /* [out] */ pEp_color *rating) = 0;
    5.31 +            /* [retval][out] */ pEp_color *rating) = 0;
    5.32          
    5.33          virtual HRESULT STDMETHODCALLTYPE outgoing_message_color( 
    5.34              /* [in] */ ITextMessage *msg,
    5.35 @@ -931,7 +932,7 @@
    5.36              /* [in] */ ITextMessage *src,
    5.37              /* [out] */ ITextMessage **dst,
    5.38              /* [out] */ SAFEARRAY * *keylist,
    5.39 -            /* [out] */ pEp_color *rating);
    5.40 +            /* [retval][out] */ pEp_color *rating);
    5.41          
    5.42          HRESULT ( STDMETHODCALLTYPE *outgoing_message_color )( 
    5.43              IpEpEngine * This,