diff --git a/CpEpEngine.cpp b/CpEpEngine.cpp index 19b8cee..a4524b0 100644 --- a/CpEpEngine.cpp +++ b/CpEpEngine.cpp @@ -1032,11 +1032,11 @@ PEP_STATUS CpEpEngine::messageToSend(message *msg) } } - sync_callbacks.compact(); - if (ljs) ljs->messageToSend(msg); + sync_callbacks.compact(); + return PEP_STATUS_OK; } diff --git a/CpEpEngine.h b/CpEpEngine.h index 17fafbe..d5b9749 100644 --- a/CpEpEngine.h +++ b/CpEpEngine.h @@ -64,7 +64,6 @@ public: error(ex.what()); } session(pEp::Adapter::release); - shutdown(); sync_callbacks.clear([](CpEpEngine::MarshaledCallbacks *p) { if (p) { diff --git a/pEpCOMServerAdapter.cpp b/pEpCOMServerAdapter.cpp index 3a2a904..0659015 100644 --- a/pEpCOMServerAdapter.cpp +++ b/pEpCOMServerAdapter.cpp @@ -8,6 +8,7 @@ #include "GateKeeper.h" #include "pEpCOMServerAdapter.h" #include "LocalJSONAdapter.h" +#include "../libpEpAdapter/callback_dispatcher.hh" using namespace ATL; using namespace std; @@ -20,6 +21,7 @@ void CpEpCOMServerAdapterModule::gatekeeper(CpEpCOMServerAdapterModule * self) CpEpCOMServerAdapterModule _AtlModule; LocalJSONAdapter* ljs = nullptr; +extern pEp::CallbackDispatcher callback_dispatcher; extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int nShowCmd) @@ -32,7 +34,7 @@ extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/ if (!boost::algorithm::iequals(lpCmdLine, "/regserver")) { ljs = &LocalJSONAdapter::createInstance(); - ljs->startup(pEp::Adapter::_messageToSend); + ljs->startup(pEp::CallbackDispatcher::messageToSend); } auto rv = _AtlModule.WinMain(nShowCmd); diff --git a/pEpCOMServerAdapter.idl b/pEpCOMServerAdapter.idl index 5435cbe..5e1e656 100644 --- a/pEpCOMServerAdapter.idl +++ b/pEpCOMServerAdapter.idl @@ -38,6 +38,9 @@ interface IpEpEngineCallbacks : IUnknown { // forming group // SyncNotifyFormingGroup = 10, + SyncNotifyStart = 126, + SyncNotifyStop = 127, + // message cannot be sent, need passphrase SyncNotifyPassphraseRequired = 128,