summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-10-19 14:34:33 +0200
committerSven Gothel <[email protected]>2020-10-19 14:34:33 +0200
commitd1dfa4ffdd8ab8402c71d35cd0eb386342207a27 (patch)
tree495262a8d33486af9c82d982e80319dbd985b253
parentdfb29bee4fcfb67cda0357f5ebaa86d4aaf35aec (diff)
DBTAdapter: ERR -> WARN: startDiscovery + startDiscoveryBackground on Adapter not enabled/powered
-rw-r--r--src/direct_bt/DBTAdapter.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/direct_bt/DBTAdapter.cpp b/src/direct_bt/DBTAdapter.cpp
index 5f90279c..154a7366 100644
--- a/src/direct_bt/DBTAdapter.cpp
+++ b/src/direct_bt/DBTAdapter.cpp
@@ -446,8 +446,11 @@ HCIStatusCode DBTAdapter::startDiscovery(const bool keepAlive, const HCILEOwnAdd
const uint16_t le_scan_interval, const uint16_t le_scan_window)
{
// FIXME: Respect DBTAdapter::btMode, i.e. BTMode::BREDR, BTMode::LE or BTMode::DUAL to setup BREDR, LE or DUAL scanning!
+ // ERR_PRINT("Test");
+ // throw jau::RuntimeException("Test", E_FILE_LINE);
+
if( !isEnabled() ) {
- ERR_PRINT("DBTAdapter::startDiscovery: Adapter not enabled/powered: %s", toString().c_str());
+ WARN_PRINT("DBTAdapter::startDiscovery: Adapter not enabled/powered: %s", toString().c_str());
return HCIStatusCode::INTERNAL_FAILURE;
}
const std::lock_guard<std::mutex> lock(mtx_discovery); // RAII-style acquire and relinquish via destructor
@@ -498,7 +501,7 @@ HCIStatusCode DBTAdapter::startDiscovery(const bool keepAlive, const HCILEOwnAdd
void DBTAdapter::startDiscoveryBackground() noexcept {
// FIXME: Respect DBTAdapter::btMode, i.e. BTMode::BREDR, BTMode::LE or BTMode::DUAL to setup BREDR, LE or DUAL scanning!
if( !isEnabled() ) {
- ERR_PRINT("DBTAdapter::startDiscoveryBackground: Adapter not enabled/powered: %s", toString().c_str());
+ WARN_PRINT("DBTAdapter::startDiscoveryBackground: Adapter not enabled/powered: %s", toString().c_str());
return;
}
const std::lock_guard<std::mutex> lock(mtx_discovery); // RAII-style acquire and relinquish via destructor