From 5d6fce79836934f75fc595e9809419aa7a2268ca Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sat, 4 Jul 2020 18:47:34 +0200 Subject: [PATCH] moving up front --- callback_dispatcher.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/callback_dispatcher.cc b/callback_dispatcher.cc index f8050b5..6cd6085 100644 --- a/callback_dispatcher.cc +++ b/callback_dispatcher.cc @@ -8,6 +8,9 @@ pEp::CallbackDispatcher pEp::callback_dispatcher; namespace pEp { PEP_STATUS CallbackDispatcher::messageToSend(::message *msg) { + if (Adapter::on_sync_thread() && !msg) + return PassphraseCache::messageToSend(passphrase_cache, Adapter::session()); + return callback_dispatcher._messageToSend(msg); } @@ -88,9 +91,6 @@ namespace pEp { PEP_STATUS CallbackDispatcher::_messageToSend(::message *msg) { - if (Adapter::on_sync_thread() && !msg) - return PassphraseCache::messageToSend(passphrase_cache, Adapter::session()); - for (auto target : targets) { ::message *_msg = nullptr; if (msg) {