CpEpEngine.cpp
changeset 268 4d41410af9a0
parent 264 aa6bd84bd6c3
child 269 26c8597fe860
     1.1 --- a/CpEpEngine.cpp	Fri Dec 01 19:38:09 2017 +0100
     1.2 +++ b/CpEpEngine.cpp	Thu Feb 01 23:30:55 2018 +0100
     1.3 @@ -8,6 +8,10 @@
     1.4  using namespace pEp::utility;
     1.5  
     1.6  // CpEpEngine
     1.7 +
     1.8 +// the init_mutex protects our initialization and destruction
     1.9 +// against a running keysync thread, and it ensures that the
    1.10 +// keysync thread actually has finished before we're destructed.
    1.11  std::mutex CpEpEngine::init_mutex;
    1.12  
    1.13  STDMETHODIMP CpEpEngine::InterfaceSupportsErrorInfo(REFIID riid)
    1.14 @@ -826,7 +830,7 @@
    1.15      if (status == ::PEP_OUT_OF_MEMORY)
    1.16          return E_OUTOFMEMORY;
    1.17  
    1.18 -    return E_FAIL;
    1.19 +    return MAKE_HRESULT(1, FACILITY_ITF, (0xFFFF & status));
    1.20  }
    1.21  
    1.22  STDMETHODIMP CpEpEngine::EncryptMessage(TextMessage * src, TextMessage * dst, SAFEARRAY * extra, pEpEncryptFlags flags)