From 377fcc940b3a60a95faf998068b6c3f0a92fc6a4 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Mon, 6 Jul 2020 08:36:00 +0200 Subject: [PATCH 2/2] using new libpEpAdapter --- src/foundation_pEp_jniadapter_AbstractEngine.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/foundation_pEp_jniadapter_AbstractEngine.cc b/src/foundation_pEp_jniadapter_AbstractEngine.cc index b4e038b..87c1f9a 100644 --- a/src/foundation_pEp_jniadapter_AbstractEngine.cc +++ b/src/foundation_pEp_jniadapter_AbstractEngine.cc @@ -101,9 +101,12 @@ PEP_STATUS messageToSend(message *msg) // When a protocol implementation of the p≡p engine using messageToSend() cannot sign or encrypt with an // empty passphrase and not with the configured passphrase it is calling messageToSend() with a NULL instead // of a struct _message object. - if (Adapter::on_sync_thread() && !msg) { - return pEp::PassphraseCache::messageToSend(cache, Adapter::session()); - } + if (Adapter::on_sync_thread() && !msg) + return pEp::PassphraseCache::config_next_passphrase(); + + // reset passphrase iterator + if (Adapter::on_sync_thread()) + return pEp::PassphraseCache::config_next_passphrase(true); jobject msg_ = nullptr; assert(messageClass && messageConstructorMethodID && objj && messageToSendMethodID);