Browse Source

Remove macro LOGD

This is an ancient leftover that has been replaced by pEpLog
pull/35/head
heck 2 years ago
parent
commit
f50e81aab5
  1. 2
      src/cxx/basic_api.cc
  2. 16
      src/cxx/jniutils.cc
  3. 8
      src/cxx/jniutils.hh

2
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;
}

16
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, "<init>", "(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<timestamp *>(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;

8
src/cxx/jniutils.hh

@ -12,14 +12,6 @@
#include <pEp/passphrase_cache.hh>
#include <pEp/platform.h>
#if 0 // Enable if log needed
#include <android/log.h>
#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

Loading…
Cancel
Save