diff options
author | Sven Gothel <[email protected]> | 2020-10-15 01:50:01 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-15 01:50:01 +0200 |
commit | b34adb9bd051166488ceb6c0bffb76095c0d16f4 (patch) | |
tree | 023ccfc13ce765c0fc73e81f6ef0bdca5177ec83 /src | |
parent | 236cb386f133b5aeb4e2db5813709dbb3619daca (diff) |
DBTDevice::remove()/DBTAdapter::removeDevice(): Add some WORDY_PRINT(..)
Diffstat (limited to 'src')
-rw-r--r-- | src/direct_bt/DBTAdapter.cpp | 3 | ||||
-rw-r--r-- | src/direct_bt/DBTDevice.cpp | 2 |
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 { |