diff options
author | Sven Gothel <[email protected]> | 2020-05-11 07:26:40 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-05-11 07:26:40 +0200 |
commit | 09cd1183b3599357b05c426e2b59e8df813304c5 (patch) | |
tree | 345073a321a6174ea6e746437bc9252b5fa83008 | |
parent | ed4d9268b2a7ad560e116d3b17cd3f42fcbdd650 (diff) |
Adapter::startDiscovery(): removeDevices() will not work as previously scanned devices may still be in use!
In an multi device environment, it is possible to have one device
already scanned and 'in use' w/ GATT processing
while we enter a new discovery for additional devices.
We need to think about a smart method to kick out 'old devices'
which are not in use and are no more available.
This is curently only possible for:
- end of device operation, manually remove from list
- communication breakup, i.e. loss of [GATT] communication
-rw-r--r-- | java/direct_bt/tinyb/DBTAdapter.java | 1 | ||||
-rw-r--r-- | src/direct_bt/DBTAdapter.cpp | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/java/direct_bt/tinyb/DBTAdapter.java b/java/direct_bt/tinyb/DBTAdapter.java index 71ab8394..de9059f1 100644 --- a/java/direct_bt/tinyb/DBTAdapter.java +++ b/java/direct_bt/tinyb/DBTAdapter.java @@ -246,7 +246,6 @@ 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 0005690b..5011936f 100644 --- a/src/direct_bt/DBTAdapter.cpp +++ b/src/direct_bt/DBTAdapter.cpp @@ -310,7 +310,6 @@ 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; |