diff options
author | Sven Gothel <[email protected]> | 2020-11-17 09:04:04 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-11-17 09:04:04 +0100 |
commit | 1cfc1ef1772d8e33cf07ea2d6e9e4f2b4162b653 (patch) | |
tree | e767d77449a6eff40dfc8498486c33fe66fbbea3 | |
parent | 9776fbc01a2f279cbe65e8d7e0019386e4fae25c (diff) |
Fix minor compiler error: DBTScanner10.java: complete using executeOffThread(..) editing; SMPHandler: Avoid unused arguments
-rw-r--r-- | examples/java/DBTScanner10.java | 6 | ||||
-rw-r--r-- | src/direct_bt/DBTDevice.cpp | 2 | ||||
-rw-r--r-- | src/direct_bt/SMPHandler.cpp | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/examples/java/DBTScanner10.java b/examples/java/DBTScanner10.java index bfafe362..541c8118 100644 --- a/examples/java/DBTScanner10.java +++ b/examples/java/DBTScanner10.java @@ -143,7 +143,7 @@ public class DBTScanner10 { newmask.isSet(AdapterSettings.SettingType.POWERED) ) { - executeOffThread( () -> { startDiscovery(adapter, "powered-on"); }, + executeOffThread( () -> { startDiscovery(adapter, "powered-on"); }, "DBT-StartDiscovery-"+adapter.getAddress(), true /* detach */); } } @@ -235,9 +235,7 @@ public class DBTScanner10 { } if( 0 < RESET_ADAPTER_EACH_CONN && 0 == connectionCount.get() % RESET_ADAPTER_EACH_CONN ) { executeOffThread( () -> { resetAdapter(device.getAdapter(), 1); }, - "DBT-Reset-"+device.getAdapter().getAddress() ); - adapterResetTask.setDaemon(true); // detach thread - adapterResetTask.start(); + "DBT-Reset-"+device.getAdapter().getAddress(), true /* detach */ ); } } }; diff --git a/src/direct_bt/DBTDevice.cpp b/src/direct_bt/DBTDevice.cpp index b6046fd4..ee2be465 100644 --- a/src/direct_bt/DBTDevice.cpp +++ b/src/direct_bt/DBTDevice.cpp @@ -699,6 +699,8 @@ bool DBTDevice::connectSMP(std::shared_ptr<DBTDevice> sthis, const uint8_t sec_l return smpHandler->establishSecurity(sec_level); #else DBG_PRINT("DBTDevice::connectSMP: SMP Not supported by OS (0): %s", toString().c_str()); + (void)sthis; + (void)sec_level; return false; #endif } diff --git a/src/direct_bt/SMPHandler.cpp b/src/direct_bt/SMPHandler.cpp index e637c556..3255aaf8 100644 --- a/src/direct_bt/SMPHandler.cpp +++ b/src/direct_bt/SMPHandler.cpp @@ -203,6 +203,7 @@ SMPHandler::~SMPHandler() noexcept { bool SMPHandler::establishSecurity(const uint8_t sec_level) { // FIXME: Start negotiating security! // FIXME: Return true only if security has been established (encryption and optionally authentication) + (void)sec_level; return false; } |