This commit is contained in:
Grant Limberg 2015-07-01 18:13:39 -07:00
parent d853dbf2d8
commit f803dd5ff4
3 changed files with 9 additions and 1 deletions

View File

@ -42,6 +42,7 @@
<exec dir="jni" executable="${env.NDK_BUILD_LOC}" failonerror="true">
<arg value="ZT1=${env.ZT}"/>
<arg value="V=1"/>
<!-- <arg value="NDK_DEBUG=1"/> -->
</exec>
<copy file="libs/arm64-v8a/libZeroTierOneJNI.so"
tofile="classes/lib/arm64-v8a/libZeroTierOneJNI.so"

View File

@ -5,6 +5,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ZeroTierOneJNI
LOCAL_C_INCLUDES := $(ZT1)/include
LOCAL_LDLIBS := -llog
# LOCAL_CFLAGS := -g
# ZeroTierOne SDK source files
LOCAL_SRC_FILES := \

View File

@ -192,7 +192,11 @@ namespace {
{
LOGV("EventCallback");
JniRef *ref = (JniRef*)userData;
assert(ref->node == node);
if(ref->node != node)
{
LOGE("Nodes not equal. ref->node %p, node %p", ref->node, node);
return;
}
JNIEnv *env = NULL;
ref->jvm->GetEnv((void**)&env, JNI_VERSION_1_6);
@ -613,6 +617,8 @@ JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_node_1init(
&VirtualNetworkConfigFunctionCallback,
&EventCallback);
LOGI("Node Created.");
if(rc != ZT1_RESULT_OK)
{
LOGE("Error creating Node: %d", rc);