From 5f85c064a1fee3440ec4a23d44acee603ba97e8a Mon Sep 17 00:00:00 2001 From: heck Date: Tue, 18 Aug 2020 21:29:09 +0200 Subject: [PATCH] just cosmetics --- .hgignore | 1 + src/foundation_pEp_jniadapter_AbstractEngine.cc | 2 +- src/passphrase_callback.hh | 9 ++++----- src/passphrase_callback.hxx | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.hgignore b/.hgignore index d83d981..e81e918 100644 --- a/.hgignore +++ b/.hgignore @@ -39,6 +39,7 @@ IdentityFlags.java SyncHandshakeSignal.java CipherSuite.java +passphrase_status_list.yml2 status_list.yml2 ndk*/ diff --git a/src/foundation_pEp_jniadapter_AbstractEngine.cc b/src/foundation_pEp_jniadapter_AbstractEngine.cc index 026e18b..e5714ba 100644 --- a/src/foundation_pEp_jniadapter_AbstractEngine.cc +++ b/src/foundation_pEp_jniadapter_AbstractEngine.cc @@ -131,7 +131,7 @@ char* JNIAdapter::passphraseRequiredCallback(const PEP_STATUS status) { status_ = element; break; } - JNISync::env() -> DeleteLocalRef(element); + JNISync::env()->DeleteLocalRef(element); } } assert(objj && passphraseRequiredMethodID); diff --git a/src/passphrase_callback.hh b/src/passphrase_callback.hh index 30808dd..e0f9804 100644 --- a/src/passphrase_callback.hh +++ b/src/passphrase_callback.hh @@ -5,11 +5,10 @@ namespace pEp { namespace JNIAdapter { - char* passphraseRequiredCallback(const PEP_STATUS status); + char* passphraseRequiredCallback(const PEP_STATUS status); - template PEP_STATUS passphraseWrap( - PEP_STATUS f(PEP_SESSION, A...), PEP_SESSION session, A... a); - }; -}; + template PEP_STATUS passphraseWrap(PEP_STATUS f(PEP_SESSION, A...), PEP_SESSION session, A... a); + } +} #include "passphrase_callback.hxx" \ No newline at end of file diff --git a/src/passphrase_callback.hxx b/src/passphrase_callback.hxx index 63603f3..e812841 100644 --- a/src/passphrase_callback.hxx +++ b/src/passphrase_callback.hxx @@ -5,8 +5,7 @@ namespace pEp { namespace JNIAdapter { - template PEP_STATUS passphraseWrap( - PEP_STATUS f(PEP_SESSION, A...), PEP_SESSION session, A... a) { + template PEP_STATUS passphraseWrap(PEP_STATUS f(PEP_SESSION, A...), PEP_SESSION session, A... a) { pEpLog("cached passphrase mode"); bool retryAgain = false; int maxRetries = 3; @@ -17,15 +16,16 @@ namespace pEp { pEpLog("calling passphrase_cache.api from basic_api"); status = passphrase_cache.api(f, session, a...); pEpLog("PEP_STATUS:" << status); - if (status == PEP_PASSPHRASE_REQUIRED || status == PEP_WRONG_PASSPHRASE - || status == PEP_PASSPHRASE_FOR_NEW_KEYS_REQUIRED) { + if (status == PEP_PASSPHRASE_REQUIRED || + status == PEP_WRONG_PASSPHRASE || + status == PEP_PASSPHRASE_FOR_NEW_KEYS_REQUIRED) + { pEpLog("none of the cached passphrases worked"); if (retryCount < maxRetries) { // call the app char *_passphrase = passphraseRequiredCallback(status); pEpLog("callback returned, config_passphrase() with new passphrase"); - PEP_STATUS status = ::config_passphrase(session, - passphrase_cache.add(_passphrase)); + PEP_STATUS status = ::config_passphrase(session, passphrase_cache.add(_passphrase)); retryAgain = true; retryCount++; } else {