From f50e81aab56460fbcfa7e7f20ad86e9e984b80a5 Mon Sep 17 00:00:00 2001 From: heck Date: Wed, 18 Jan 2023 14:27:27 +0530 Subject: [PATCH] Remove macro LOGD This is an ancient leftover that has been replaced by pEpLog --- src/cxx/basic_api.cc | 2 -- src/cxx/jniutils.cc | 16 ---------------- src/cxx/jniutils.hh | 8 -------- 3 files changed, 26 deletions(-) diff --git a/src/cxx/basic_api.cc b/src/cxx/basic_api.cc index 7143ec0..b4f39e6 100644 --- a/src/cxx/basic_api.cc +++ b/src/cxx/basic_api.cc @@ -86,7 +86,6 @@ JNIEXPORT jobject JNICALL Java_foundation_pEp_jniadapter_Engine__1myself(JNIEnv PEP_STATUS status = passphraseWrap(::myself, session(), _ident); if (status != PEP_STATUS_OK) { - LOGD("Failed Myself: 0x%04x\\n", status); throw_pEp_Exception(env, status); return NULL; } @@ -130,7 +129,6 @@ JNIEXPORT jobject JNICALL Java_foundation_pEp_jniadapter_Engine__1setOwnKey(JNIE PEP_STATUS status = passphraseWrap(::set_own_key, session(), _ident, _fpr); if (status != PEP_STATUS_OK) { - LOGD("Failed setOwnKey: 0x%04x\\n", status); throw_pEp_Exception(env, status); return NULL; } diff --git a/src/cxx/jniutils.cc b/src/cxx/jniutils.cc index 8bacea0..7eca08c 100644 --- a/src/cxx/jniutils.cc +++ b/src/cxx/jniutils.cc @@ -406,15 +406,7 @@ jobject from_timestamp(JNIEnv *env, return NULL; } - //LOGD("/* Seconds (0-60) */ FROM :%d", ts->tm_sec); - //LOGD("/* Minutes (0-59) */ :%d", ts->tm_min); - //LOGD("/* Hours (0-23) */ :%d", ts->tm_hour); - //LOGD("/* Day of the month (1-31) */:%d", ts->tm_mday); - //LOGD("/* Month (0-11) */ :%d", ts->tm_mon); - //LOGD("/* Year - 1900 */ :%d", ts->tm_year); - time_t t = timegm(ts) * 1000; - //LOGD( "TimeGM returns : %lld", t); jclass clazz = findClass(env, "java/util/Date"); jmethodID constructor = env->GetMethodID(clazz, "", "(J)V"); assert(constructor); @@ -434,7 +426,6 @@ timestamp *to_timestamp(JNIEnv *env, } jlong t = callLongMethod(env, date, "getTime"); - //LOGD( "Set Time to : %lld", t); timestamp *ts = static_cast(calloc(1, sizeof(timestamp))); assert(ts); if (ts == NULL) { @@ -444,13 +435,6 @@ timestamp *to_timestamp(JNIEnv *env, if (t) { time_t clock = t / 1000; gmtime_r(&clock, (struct tm*)ts); - - //LOGD("/* Seconds (0-60) */ TO :%d", ts->tm_sec); - //LOGD("/* Minutes (0-59) */ :%d", ts->tm_min); - //LOGD("/* Hours (0-23) */ :%d", ts->tm_hour); - //LOGD("/* Day of the month (1-31) */:%d", ts->tm_mday); - //LOGD("/* Month (0-11) */ :%d", ts->tm_mon); - //LOGD("/* Year - 1900 */ :%d", ts->tm_year); } return ts; diff --git a/src/cxx/jniutils.hh b/src/cxx/jniutils.hh index c281723..5f8ea0c 100644 --- a/src/cxx/jniutils.hh +++ b/src/cxx/jniutils.hh @@ -12,14 +12,6 @@ #include #include -#if 0 // Enable if log needed -#include -#define LOG_TAG "pEpJNIAdapter" -#define LOGD(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) -#else -#define LOGD(...) do{}while(0) -#endif - namespace pEp { namespace JNIAdapter { // Global mutex needs to be locked in all constructors which insert their own mutex object