aboutsummaryrefslogtreecommitdiffstats
path: root/java/jni/direct_bt/DBTAdapter.cxx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-01-25 18:22:20 +0100
committerSven Gothel <[email protected]>2022-01-25 18:22:20 +0100
commit4ceee4cb4d2d34e7d24db33f12c05bb617f288ca (patch)
tree67e52e399a12d1628babb303c6324b2507d4abc5 /java/jni/direct_bt/DBTAdapter.cxx
parent11465db7f8313068261b05a434ad33447ad21208 (diff)
Refine BTAdapter API and doc on commands in powerd-off state only: setName() and setSecureConnections()
Diffstat (limited to 'java/jni/direct_bt/DBTAdapter.cxx')
-rw-r--r--java/jni/direct_bt/DBTAdapter.cxx8
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) {