summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-10-18 06:54:25 +0200
committerSven Gothel <[email protected]>2020-10-18 06:54:25 +0200
commitf3e88a8c6c0a5b255c20e0913c2ef865a1204909 (patch)
treeac14e487c413738db29b7f852abe851bece45fb0 /src
parent76bd754835370d8523a4e0ae39ee6b4a80ba3516 (diff)
DBTDevice/DBTAdapter: Move WORDY_PRINT to adapter::removeDevice(..)
Diffstat (limited to 'src')
-rw-r--r--src/direct_bt/DBTAdapter.cpp2
-rw-r--r--src/direct_bt/DBTDevice.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/direct_bt/DBTAdapter.cpp b/src/direct_bt/DBTAdapter.cpp
index 46d4f8cf..bed9f624 100644
--- a/src/direct_bt/DBTAdapter.cpp
+++ b/src/direct_bt/DBTAdapter.cpp
@@ -653,10 +653,12 @@ std::shared_ptr<DBTDevice> DBTAdapter::findSharedDevice (EUI48 const & mac, cons
}
void DBTAdapter::removeDevice(DBTDevice & device) noexcept {
+ WORDY_PRINT("DBTAdapter::removeDevice: Start %s", toString(false).c_str());
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
+ WORDY_PRINT("DBTAdapter::removeDevice: End %s", toString(false).c_str());
removeSharedDevice(device);
}
diff --git a/src/direct_bt/DBTDevice.cpp b/src/direct_bt/DBTDevice.cpp
index 59a7b83d..57fe251c 100644
--- a/src/direct_bt/DBTDevice.cpp
+++ b/src/direct_bt/DBTDevice.cpp
@@ -501,9 +501,7 @@ 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 {