From 03646d116b794fc72893d873101f77f43edcbaa5 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 9 May 2014 09:40:36 +0800 Subject: [PATCH] fix jni --- src/android.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android.cpp b/src/android.cpp index fdd2b7bb..fd4c6200 100644 --- a/src/android.cpp +++ b/src/android.cpp @@ -62,7 +62,7 @@ jint new_protected_socket() if (newProtectedSocketMethod != NULL) { JNIEnv* env = uenv.env; - return (*env)->CallStaticIntMethod(env, SocketCls, newProtectedSocketMethod); + return env->CallStaticIntMethod(clazz, newProtectedSocketMethod); } return -1; } @@ -72,7 +72,7 @@ void free_protected_socket(jint fd) if (newProtectedSocketMethod != NULL) { JNIEnv* env = uenv.env; - (*env)->CallStaticVoidMethod(env, SocketCls, freeProtectedSocketMethod, fd); + env->CallStaticVoidMethod(clazz, freeProtectedSocketMethod, fd); } }