COM-121
Volker Birk 4 years ago
parent e25e940a62
commit e2d8979cde

@ -736,12 +736,14 @@ int CpEpEngine::examine_identity(pEp_identity *ident, void *management)
return _ident;
}
PEP_STATUS CpEpEngine::_messageToSend(message *msg, bool in_sync)
PEP_STATUS CpEpEngine::messageToSend(message *msg)
{
assert(msg);
if (!msg)
return PEP_ILLEGAL_VALUE;
bool in_sync = on_sync_thread();
for (auto p = sync_callbacks.begin(); p != sync_callbacks.end(); ++p) {
IpEpEngineCallbacks *cb;
if (in_sync)
@ -767,22 +769,14 @@ PEP_STATUS CpEpEngine::_messageToSend(message *msg, bool in_sync)
return PEP_STATUS_OK;
}
PEP_STATUS CpEpEngine::messageToSend(message *msg)
{
return _messageToSend(msg);
}
PEP_STATUS CpEpEngine::messageToSend_sync(message *msg)
{
return _messageToSend(msg, true);
}
PEP_STATUS CpEpEngine::_notifyHandshake(::pEp_identity *self, ::pEp_identity *partner, sync_handshake_signal signal, bool in_sync)
PEP_STATUS CpEpEngine::notifyHandshake(::pEp_identity *self, ::pEp_identity *partner, sync_handshake_signal signal)
{
assert(self && partner);
if (!(self && partner))
return PEP_ILLEGAL_VALUE;
bool in_sync = on_sync_thread();
// fire all of them
for (auto p = sync_callbacks.begin(); p != sync_callbacks.end(); ++p) {
IpEpEngineCallbacks *cb;
@ -811,16 +805,6 @@ PEP_STATUS CpEpEngine::_notifyHandshake(::pEp_identity *self, ::pEp_identity *pa
return PEP_STATUS_OK;
}
PEP_STATUS CpEpEngine::notifyHandshake(::pEp_identity *self, ::pEp_identity *partner, sync_handshake_signal signal)
{
return _notifyHandshake(self, partner, signal);
}
PEP_STATUS CpEpEngine::notifyHandshake_sync(::pEp_identity *self, ::pEp_identity *partner, sync_handshake_signal signal)
{
return _notifyHandshake(self, partner, signal, true);
}
STDMETHODIMP CpEpEngine::BlacklistAdd(BSTR fpr)
{
assert(fpr);

@ -87,7 +87,7 @@ public:
::register_examine_function(session(), CpEpEngine::examine_identity, (void *)this);
::log_event(session(), "Startup", "pEp COM Adapter", NULL, NULL);
startup<CpEpEngine>(messageToSend, notifyHandshake, messageToSend_sync, notifyHandshake_sync, this, &CpEpEngine::Startup_sync);
startup<CpEpEngine>(messageToSend, notifyHandshake, this, &CpEpEngine::Startup_sync);
return S_OK;
}
@ -100,15 +100,9 @@ protected:
typedef locked_queue<pEp_identity_cpp> identity_queue_t;
static ::pEp_identity * retrieve_next_identity(void *management);
static PEP_STATUS _messageToSend(message *msg, bool in_sync = false);
static PEP_STATUS _notifyHandshake(pEp_identity *self, pEp_identity *partner, sync_handshake_signal signal, bool in_sync = false);
static PEP_STATUS messageToSend(message *msg);
static PEP_STATUS notifyHandshake(pEp_identity *self, pEp_identity *partner, sync_handshake_signal signal);
static PEP_STATUS messageToSend_sync(message *msg);
static PEP_STATUS notifyHandshake_sync(pEp_identity *self, pEp_identity *partner, sync_handshake_signal signal);
HRESULT error(_bstr_t msg);
HRESULT error(_bstr_t msg, PEP_STATUS errorcode);

Loading…
Cancel
Save