summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/direct_bt/DBTAdapter.cpp3
-rw-r--r--src/direct_bt/DBTDevice.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/direct_bt/DBTAdapter.cpp b/src/direct_bt/DBTAdapter.cpp
index 58b78e7e..f0c304ec 100644
--- a/src/direct_bt/DBTAdapter.cpp
+++ b/src/direct_bt/DBTAdapter.cpp
@@ -664,7 +664,8 @@ std::shared_ptr<DBTDevice> DBTAdapter::findSharedDevice (EUI48 const & mac, cons
}
void DBTAdapter::removeDevice(DBTDevice & device) noexcept {
- device.disconnect(HCIStatusCode::REMOTE_USER_TERMINATED_CONNECTION);
+ const HCIStatusCode status = device.disconnect(HCIStatusCode::REMOTE_USER_TERMINATED_CONNECTION);
+ WORDY_PRINT("DBTAdapter::removeDevice: disconnect %s, %s", getHCIStatusCodeString(status).c_str(), toString(false).c_str());
removeConnectedDevice(device); // usually done in DBTAdapter::mgmtEvDeviceDisconnectedHCI
removeDiscoveredDevice(device); // usually done in DBTAdapter::mgmtEvDeviceDisconnectedHCI
removeSharedDevice(device);
diff --git a/src/direct_bt/DBTDevice.cpp b/src/direct_bt/DBTDevice.cpp
index 57394504..402f45e1 100644
--- a/src/direct_bt/DBTDevice.cpp
+++ b/src/direct_bt/DBTDevice.cpp
@@ -513,7 +513,9 @@ HCIStatusCode DBTDevice::pair(const std::string & passkey) {
}
void DBTDevice::remove() noexcept {
+ WORDY_PRINT("DBTDevice::remove: Start %s", toString(false).c_str());
adapter.removeDevice(*this);
+ WORDY_PRINT("DBTDevice::remove: End %s", toString(false).c_str());
}
bool DBTDevice::connectGATT() noexcept {