From 66f582cae61328d6a515ff3f55a911a66612fa76 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Tue, 30 Oct 2018 10:38:07 +0100 Subject: [PATCH] use libpEpAdapter's session() function --- src/gen_cpp_Engine.ysl2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gen_cpp_Engine.ysl2 b/src/gen_cpp_Engine.ysl2 index cbf5c58..3b65d34 100644 --- a/src/gen_cpp_Engine.ysl2 +++ b/src/gen_cpp_Engine.ysl2 @@ -13,10 +13,12 @@ tstylesheet { #include #include #include + #include #include "org_pEp_jniadapter_«@name».h" #include "throw_pEp_exception.hh" #include "jniutils.hh" + using namespace pEp::Adapter; using namespace pEp::JNIAdapter; extern "C" { @@ -46,15 +48,13 @@ tstylesheet { jobject obj`apply "parm[in|inout]", mode=sig` ) { - PEP_SESSION session = (PEP_SESSION) callLongMethod(env, obj, "getHandle"); - || apply "parm[in|inout]", mode=in; apply "parm[creates|returns]", mode=out; || - PEP_STATUS status = ::«@name»(session`apply "parm", mode=call`); + PEP_STATUS status = ::«@name»(session()`apply "parm", mode=call`); if ((status > PEP_STATUS_OK && status < PEP_UNENCRYPTED) |`> |` status < PEP_STATUS_OK |`> |` status >= PEP_TRUSTWORD_NOT_FOUND) {