mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-02 07:20:51 +00:00
Fix DataStoreGetFunction.
This commit is contained in:
parent
58ca657da6
commit
b6196a53de
@ -333,10 +333,13 @@ namespace {
|
|||||||
|
|
||||||
if(retval > 0)
|
if(retval > 0)
|
||||||
{
|
{
|
||||||
env->GetByteArrayRegion(bufferObj, 0, retval, (jbyte*)buffer);
|
jbyte *data = env->GetByteArrayElements(bufferObj, NULL);
|
||||||
env->GetLongArrayRegion(objectSizeObj, 0, 1, (jlong*)out_objectSize);
|
memcpy(buffer, data, retval);
|
||||||
env->DeleteLocalRef(bufferObj);
|
env->ReleaseByteArrayElements(bufferObj, data, JNI_ABORT);
|
||||||
env->DeleteLocalRef(objectSizeObj);
|
|
||||||
|
jlong *objSize = env->GetLongArrayElements(objectSizeObj, NULL);
|
||||||
|
*out_objectSize = (unsigned long)objSize[0];
|
||||||
|
env->ReleaseLongArrayElements(objectSizeObj, objSize, JNI_ABORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGI("Out Object Size: %lu", *out_objectSize);
|
LOGI("Out Object Size: %lu", *out_objectSize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user