adding the implementation of ENGINE-781 Release_2.1.0-RC8
authorVolker Birk <vb@pep-project.org>
Wed, 05 Aug 2020 21:49:26 +0200
changeset 103219d34d111523
parent 1031 13f9f0b3ad9a
child 1033 fa2c6d74d982
adding the implementation of ENGINE-781
server/mini-adapter-impl.cc
server/mini-adapter-main.cc
server/session_registry.cc
     1.1 --- a/server/mini-adapter-impl.cc	Thu Jul 30 21:53:11 2020 +0200
     1.2 +++ b/server/mini-adapter-impl.cc	Wed Aug 05 21:49:26 2020 +0200
     1.3 @@ -51,7 +51,7 @@
     1.4  	if(keyserver_lookup_session)
     1.5  		throw std::runtime_error("KeyserverLookup already started.");
     1.6  
     1.7 -	PEP_STATUS status = pEp::call_with_lock(&init, &keyserver_lookup_session, pEp::CallbackDispatcher::messageToSend, ::pEp::Adapter::_inject_sync_event);
     1.8 +	PEP_STATUS status = pEp::call_with_lock(&init, &keyserver_lookup_session, pEp::CallbackDispatcher::messageToSend, ::pEp::Adapter::_inject_sync_event, pEp::Adapter::_ensure_passphrase);
     1.9  	if(status != PEP_STATUS_OK || keyserver_lookup_session==nullptr)
    1.10  	{
    1.11  		throw std::runtime_error("Cannot create keyserver lookup session! status: " + ::pEp::status_to_string(status));
     2.1 --- a/server/mini-adapter-main.cc	Thu Jul 30 21:53:11 2020 +0200
     2.2 +++ b/server/mini-adapter-main.cc	Wed Aug 05 21:49:26 2020 +0200
     2.3 @@ -130,7 +130,7 @@
     2.4  
     2.5  	// create a dummy session just to see whether the Engine is functional.
     2.6  	// reason: here we still can log errors to stderr, because prepare_run() is called before daemonize().
     2.7 -	PEP_STATUS status = pEp::call_with_lock(&init, &first_session, pEp::CallbackDispatcher::messageToSend, pEp::Adapter::_inject_sync_event);
     2.8 +	PEP_STATUS status = pEp::call_with_lock(&init, &first_session, pEp::CallbackDispatcher::messageToSend, pEp::Adapter::_inject_sync_event, pEp::Adapter::_ensure_passphrase);
     2.9  	if(status != PEP_STATUS_OK || first_session==nullptr)
    2.10  	{
    2.11  		const std::string error_msg = "Cannot create first session! PEP_STATUS: " + ::pEp::status_to_string(status) + ".";
     3.1 --- a/server/session_registry.cc	Thu Jul 30 21:53:11 2020 +0200
     3.2 +++ b/server/session_registry.cc	Wed Aug 05 21:49:26 2020 +0200
     3.3 @@ -2,6 +2,7 @@
     3.4  #include <sstream>
     3.5  #include <pEp/call_with_lock.hh>
     3.6  #include <pEp/status_to_string.hh>
     3.7 +#include <pEp/Adapter.hh>
     3.8  
     3.9  
    3.10  // creates a PEP_SESSION if none yet exists for the given thread
    3.11 @@ -17,7 +18,7 @@
    3.12  	}
    3.13  	
    3.14  	PEP_SESSION session = nullptr;
    3.15 -	PEP_STATUS status = pEp::call_with_lock(&init, &session, mts, ise);
    3.16 +	PEP_STATUS status = pEp::call_with_lock(&init, &session, mts, ise, pEp::Adapter::_ensure_passphrase);
    3.17  	if(status != PEP_STATUS_OK)
    3.18  	{
    3.19  		throw std::runtime_error("init() fails: " + pEp::status_to_string(status) );