mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 13:07:55 +00:00
more logging
This commit is contained in:
parent
8fb9df9751
commit
b84dba3ecb
@ -416,10 +416,15 @@ namespace {
|
|||||||
{
|
{
|
||||||
// set operation
|
// set operation
|
||||||
jbyteArray bufferObj = env->NewByteArray(bufferSize);
|
jbyteArray bufferObj = env->NewByteArray(bufferSize);
|
||||||
|
if(env->ExceptionCheck() || bufferObj == NULL)
|
||||||
|
{
|
||||||
|
LOGE("Error creating byte array buffer!");
|
||||||
|
return -4;
|
||||||
|
}
|
||||||
|
|
||||||
env->SetByteArrayRegion(bufferObj, 0, bufferSize, (jbyte*)buffer);
|
env->SetByteArrayRegion(bufferObj, 0, bufferSize, (jbyte*)buffer);
|
||||||
bool bsecure = secure != 0;
|
bool bsecure = secure != 0;
|
||||||
|
|
||||||
|
|
||||||
return env->CallIntMethod(ref->dataStorePutListener,
|
return env->CallIntMethod(ref->dataStorePutListener,
|
||||||
dataStorePutCallbackMethod,
|
dataStorePutCallbackMethod,
|
||||||
nameStr, bufferObj, bsecure);
|
nameStr, bufferObj, bsecure);
|
||||||
@ -736,12 +741,14 @@ JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_processWirePacket(
|
|||||||
if(node == NULL)
|
if(node == NULL)
|
||||||
{
|
{
|
||||||
// cannot find valid node. We should never get here.
|
// cannot find valid node. We should never get here.
|
||||||
|
LOGE("Couldn't find a valid node!");
|
||||||
return createResultObject(env, ZT1_RESULT_FATAL_ERROR_INTERNAL);
|
return createResultObject(env, ZT1_RESULT_FATAL_ERROR_INTERNAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int nbtd_len = env->GetArrayLength(out_nextBackgroundTaskDeadline);
|
unsigned int nbtd_len = env->GetArrayLength(out_nextBackgroundTaskDeadline);
|
||||||
if(nbtd_len < 1)
|
if(nbtd_len < 1)
|
||||||
{
|
{
|
||||||
|
LOGE("nbtd_len < 1");
|
||||||
return createResultObject(env, ZT1_RESULT_FATAL_ERROR_INTERNAL);
|
return createResultObject(env, ZT1_RESULT_FATAL_ERROR_INTERNAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -751,6 +758,7 @@ JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_processWirePacket(
|
|||||||
jclass inetAddressClass = cache.findClass("java/net/InetAddress");
|
jclass inetAddressClass = cache.findClass("java/net/InetAddress");
|
||||||
if(inetAddressClass == NULL)
|
if(inetAddressClass == NULL)
|
||||||
{
|
{
|
||||||
|
LOGE("Can't find InetAddress class");
|
||||||
// can't find java.net.InetAddress
|
// can't find java.net.InetAddress
|
||||||
return createResultObject(env, ZT1_RESULT_FATAL_ERROR_INTERNAL);
|
return createResultObject(env, ZT1_RESULT_FATAL_ERROR_INTERNAL);
|
||||||
}
|
}
|
||||||
@ -849,6 +857,10 @@ JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_processWirePacket(
|
|||||||
packetData,
|
packetData,
|
||||||
packetLength,
|
packetLength,
|
||||||
&nextBackgroundTaskDeadline);
|
&nextBackgroundTaskDeadline);
|
||||||
|
if(rc != ZT1_RESULT_OK)
|
||||||
|
{
|
||||||
|
LOGE("ZT1_Node_processWirePacket returned: %d", rc);
|
||||||
|
}
|
||||||
|
|
||||||
jlong *outDeadline = env->GetLongArrayElements(out_nextBackgroundTaskDeadline, NULL);
|
jlong *outDeadline = env->GetLongArrayElements(out_nextBackgroundTaskDeadline, NULL);
|
||||||
outDeadline[0] = (jlong)nextBackgroundTaskDeadline;
|
outDeadline[0] = (jlong)nextBackgroundTaskDeadline;
|
||||||
|
Loading…
Reference in New Issue
Block a user