adding the implementation of ENGINE-781

pEp4Thunderbird Release_2.1.0-RC8
Volker Birk 3 years ago
parent 4825f06165
commit b57bb7545e

@ -51,7 +51,7 @@ void startKeyserverLookup()
if(keyserver_lookup_session)
throw std::runtime_error("KeyserverLookup already started.");
PEP_STATUS status = pEp::call_with_lock(&init, &keyserver_lookup_session, pEp::CallbackDispatcher::messageToSend, ::pEp::Adapter::_inject_sync_event);
PEP_STATUS status = pEp::call_with_lock(&init, &keyserver_lookup_session, pEp::CallbackDispatcher::messageToSend, ::pEp::Adapter::_inject_sync_event, pEp::Adapter::_ensure_passphrase);
if(status != PEP_STATUS_OK || keyserver_lookup_session==nullptr)
{
throw std::runtime_error("Cannot create keyserver lookup session! status: " + ::pEp::status_to_string(status));

@ -130,7 +130,7 @@ try
// create a dummy session just to see whether the Engine is functional.
// reason: here we still can log errors to stderr, because prepare_run() is called before daemonize().
PEP_STATUS status = pEp::call_with_lock(&init, &first_session, pEp::CallbackDispatcher::messageToSend, pEp::Adapter::_inject_sync_event);
PEP_STATUS status = pEp::call_with_lock(&init, &first_session, pEp::CallbackDispatcher::messageToSend, pEp::Adapter::_inject_sync_event, pEp::Adapter::_ensure_passphrase);
if(status != PEP_STATUS_OK || first_session==nullptr)
{
const std::string error_msg = "Cannot create first session! PEP_STATUS: " + ::pEp::status_to_string(status) + ".";

@ -2,6 +2,7 @@
#include <sstream>
#include <pEp/call_with_lock.hh>
#include <pEp/status_to_string.hh>
#include <pEp/Adapter.hh>
// creates a PEP_SESSION if none yet exists for the given thread
@ -17,7 +18,7 @@ PEP_SESSION SessionRegistry::get(std::thread::id tid)
}
PEP_SESSION session = nullptr;
PEP_STATUS status = pEp::call_with_lock(&init, &session, mts, ise);
PEP_STATUS status = pEp::call_with_lock(&init, &session, mts, ise, pEp::Adapter::_ensure_passphrase);
if(status != PEP_STATUS_OK)
{
throw std::runtime_error("init() fails: " + pEp::status_to_string(status) );

Loading…
Cancel
Save