diff options
Diffstat (limited to 'java/jni/direct_bt')
-rw-r--r-- | java/jni/direct_bt/DBTAdapter.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/java/jni/direct_bt/DBTAdapter.cxx b/java/jni/direct_bt/DBTAdapter.cxx index 8af300fd..6d26e1ec 100644 --- a/java/jni/direct_bt/DBTAdapter.cxx +++ b/java/jni/direct_bt/DBTAdapter.cxx @@ -834,15 +834,17 @@ jboolean Java_jau_direct_1bt_DBTAdapter_getSecureConnectionsEnabled(JNIEnv *env, return JNI_FALSE; } -jboolean Java_jau_direct_1bt_DBTAdapter_setSecureConnections(JNIEnv *env, jobject obj, jboolean enable) { +jbyte Java_jau_direct_1bt_DBTAdapter_setSecureConnectionsImpl(JNIEnv *env, jobject obj, jboolean enable) { try { BTAdapter *adapter = jau::getJavaUplinkObject<BTAdapter>(env, obj); jau::JavaGlobalObj::check(adapter->getJavaObject(), E_FILE_LINE); - return adapter->setSecureConnections(JNI_TRUE == enable ? true : false) ? JNI_TRUE : JNI_FALSE; + HCIStatusCode res = adapter->setSecureConnections(JNI_TRUE == enable ? true : false); + return (jbyte) number(res); } catch(...) { rethrow_and_raise_java_exception(env); } - return JNI_FALSE; + return (jbyte) number(HCIStatusCode::INTERNAL_FAILURE); +} } void Java_jau_direct_1bt_DBTAdapter_setServerConnSecurityImpl(JNIEnv *env, jobject obj, jbyte jsec_level, jbyte jio_cap) { |