diff options
author | Sven Gothel <[email protected]> | 2020-05-11 07:35:24 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-05-11 07:35:24 +0200 |
commit | 2a264bce0f6e5fffdc9488c5e00babd22d711876 (patch) | |
tree | 3eef6f9af174caea52005b1611c21c8d89b36aa7 | |
parent | 5f6a25d8c9bc00b873c5770360e95071206c26ea (diff) |
Revert "Adapter::startDiscovery(): removeDevices() will not work as previously scanned devices may still be in use!"
This reverts commit 09cd1183b3599357b05c426e2b59e8df813304c5.
-rw-r--r-- | java/direct_bt/tinyb/DBTAdapter.java | 1 | ||||
-rw-r--r-- | src/direct_bt/DBTAdapter.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/java/direct_bt/tinyb/DBTAdapter.java b/java/direct_bt/tinyb/DBTAdapter.java index de9059f1..71ab8394 100644 --- a/java/direct_bt/tinyb/DBTAdapter.java +++ b/java/direct_bt/tinyb/DBTAdapter.java @@ -246,6 +246,7 @@ public class DBTAdapter extends DBTObject implements BluetoothAdapter @Override public synchronized boolean startDiscovery() throws BluetoothException { open(); + removeDevices(); final boolean res = startDiscoveryImpl(); isDiscovering = res; return res; diff --git a/src/direct_bt/DBTAdapter.cpp b/src/direct_bt/DBTAdapter.cpp index 5011936f..0005690b 100644 --- a/src/direct_bt/DBTAdapter.cpp +++ b/src/direct_bt/DBTAdapter.cpp @@ -310,6 +310,7 @@ bool DBTAdapter::startDiscovery(HCIAddressType own_mac_type, (void)interval; (void)window; + removeDiscoveredDevices(); keepDiscoveringAlive = true; currentScanType = mgmt.startDiscovery(dev_id); return ScanType::SCAN_TYPE_NONE != currentScanType; |