From 2bec9fb5161a58701d0748a839155f8b104e532c Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Wed, 22 Jul 2020 10:48:43 +0200 Subject: [PATCH] make session explicit --- passphrase_cache.cc | 4 ++-- passphrase_cache.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/passphrase_cache.cc b/passphrase_cache.cc index 45e10b1..6c5a806 100644 --- a/passphrase_cache.cc +++ b/passphrase_cache.cc @@ -125,7 +125,7 @@ namespace pEp { return c._which->passphrase.c_str(); } - PEP_STATUS PassphraseCache::config_next_passphrase(bool reset) + PEP_STATUS PassphraseCache::config_next_passphrase(bool reset, PEP_SESSION session) { static pEp::PassphraseCache _copy; static bool new_copy = true; @@ -141,7 +141,7 @@ namespace pEp { } try { - ::config_passphrase(Adapter::session(), latest_passphrase(_copy)); + ::config_passphrase(session ? session : Adapter::session(), latest_passphrase(_copy)); return PEP_STATUS_OK; } catch (pEp::PassphraseCache::Empty&) { diff --git a/passphrase_cache.hh b/passphrase_cache.hh index 205d1ea..08cc3a0 100644 --- a/passphrase_cache.hh +++ b/passphrase_cache.hh @@ -58,7 +58,7 @@ namespace pEp { // other until the cache is exhausted // call with reset = true to reset the iterator - static PEP_STATUS config_next_passphrase(bool reset=false); + static PEP_STATUS config_next_passphrase(bool reset=false, PEP_SESSION session = NULL); // convenience functions // i.e.