summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-10-15 01:50:01 +0200
committerSven Gothel <[email protected]>2020-10-15 01:50:01 +0200
commitb34adb9bd051166488ceb6c0bffb76095c0d16f4 (patch)
tree023ccfc13ce765c0fc73e81f6ef0bdca5177ec83 /src
parent236cb386f133b5aeb4e2db5813709dbb3619daca (diff)
DBTDevice::remove()/DBTAdapter::removeDevice(): Add some WORDY_PRINT(..)
Diffstat (limited to 'src')
-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 {