summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-07-01 18:13:39 -0700
committerGrant Limberg <glimberg@gmail.com>2015-07-01 18:13:39 -0700
commitf803dd5ff46cc03e07364961eb23feb64b7697bd (patch)
tree7768232c16f55b53e39f9e66e8b25e38f2668043 /java
parentd853dbf2d88d4c7b0016e4416b7d046801e4f65a (diff)
downloadinfinitytier-f803dd5ff46cc03e07364961eb23feb64b7697bd.tar.gz
infinitytier-f803dd5ff46cc03e07364961eb23feb64b7697bd.zip
...
Diffstat (limited to 'java')
-rw-r--r--java/build.xml1
-rw-r--r--java/jni/Android.mk1
-rw-r--r--java/jni/com_zerotierone_sdk_Node.cpp8
3 files changed, 9 insertions, 1 deletions
diff --git a/java/build.xml b/java/build.xml
index 4bc1cdc0..4604ad66 100644
--- a/java/build.xml
+++ b/java/build.xml
@@ -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"
diff --git a/java/jni/Android.mk b/java/jni/Android.mk
index 9986c2c3..15ba3875 100644
--- a/java/jni/Android.mk
+++ b/java/jni/Android.mk
@@ -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 := \
diff --git a/java/jni/com_zerotierone_sdk_Node.cpp b/java/jni/com_zerotierone_sdk_Node.cpp
index ca4c4838..e8f7272b 100644
--- a/java/jni/com_zerotierone_sdk_Node.cpp
+++ b/java/jni/com_zerotierone_sdk_Node.cpp
@@ -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);