COM server adapter including sync

COM-121
Volker Birk 4 years ago
parent 3b11b12a2d
commit 31ef02f2c9
  1. 2
      CpEpEngine.cpp
  2. 14
      CpEpEngine.h

@ -21,6 +21,8 @@ std::mutex CpEpEngine::init_mutex;
std::list< IpEpEngineCallbacks * > CpEpEngine::all_callbacks;
std::mutex CpEpEngine::callbacks_mutex;
atomic< int > CpEpEngine::count = 0;
STDMETHODIMP CpEpEngine::InterfaceSupportsErrorInfo(REFIID riid)
{
static const IID* const arr[] =

@ -38,13 +38,18 @@ public:
{
// See FinalConstruct() below for most initialization work, and an
// explanation why it had to be moved there...
++count;
}
~CpEpEngine()
{
StopKeyserverLookup();
::log_event(session(), "Shutdown", "pEp COM Adapter", NULL, NULL);
session(pEp::Adapter::release);
--count;
if (!count) {
StopKeyserverLookup();
::log_event(session(), "Shutdown", "pEp COM Adapter", NULL, NULL);
session(pEp::Adapter::release);
shutdown();
}
}
DECLARE_REGISTRY_RESOURCEID(IDR_PEPENGINE)
@ -80,6 +85,7 @@ public:
::register_examine_function(session(), CpEpEngine::examine_identity, (void *)this);
::log_event(session(), "Startup", "pEp COM Adapter", NULL, NULL);
startup(messageToSend, notifyHandshake);
return S_OK;
}
@ -119,6 +125,8 @@ private:
static std::list< IpEpEngineCallbacks * > all_callbacks;
static std::mutex callbacks_mutex;
static atomic< int > count;
public:
// runtime config of the adapter

Loading…
Cancel
Save