summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-04-09 01:29:29 +0200
committerSven Gothel <[email protected]>2022-04-09 01:29:29 +0200
commit66fbc09bdc28bd59e294b53d3ab2f5f43c45f933 (patch)
tree87d03110505965d40d41add30efef69d7a0db5d3 /examples
parenteae34adaccef3b1f007c0dfdbf6901c9ac3388f2 (diff)
No need for BTAdapter::removeDiscoveredDevices() for server nor client before startDiscovert(), implicit on the latter
Diffstat (limited to 'examples')
-rw-r--r--examples/dbt_peripheral00.cpp3
-rw-r--r--examples/dbt_repeater00.cpp3
-rw-r--r--examples/dbt_test_gattcharlifecycle01.cpp3
-rw-r--r--examples/java/DBTPeripheral00.java3
4 files changed, 0 insertions, 12 deletions
diff --git a/examples/dbt_peripheral00.cpp b/examples/dbt_peripheral00.cpp
index e68ac735..623de689 100644
--- a/examples/dbt_peripheral00.cpp
+++ b/examples/dbt_peripheral00.cpp
@@ -666,9 +666,6 @@ static bool initAdapter(std::shared_ptr<BTAdapter>& adapter) {
std::shared_ptr<AdapterStatusListener> asl( std::make_shared<MyAdapterStatusListener>() );
adapter->addStatusListener( asl );
- // Flush discovered devices after registering our status listener.
- // This avoids discovered devices before we have registered!
- adapter->removeDiscoveredDevices();
adapter->setServerConnSecurity(adapter_sec_level, SMPIOCapability::UNSET);
diff --git a/examples/dbt_repeater00.cpp b/examples/dbt_repeater00.cpp
index e6848e68..60d56e82 100644
--- a/examples/dbt_repeater00.cpp
+++ b/examples/dbt_repeater00.cpp
@@ -844,9 +844,6 @@ static bool initAdapterToClient(std::shared_ptr<BTAdapter>& adapter) {
std::shared_ptr<AdapterStatusListener> asl( std::make_shared<AdapterToClientStatusListener>() );
adapter->addStatusListener( asl );
- // Flush discovered devices after registering our status listener.
- // This avoids discovered devices before we have registered!
- adapter->removeDiscoveredDevices();
adapter->setServerConnSecurity(adapterToClientSecLevel, SMPIOCapability::UNSET);
diff --git a/examples/dbt_test_gattcharlifecycle01.cpp b/examples/dbt_test_gattcharlifecycle01.cpp
index 00c5310f..b4770a17 100644
--- a/examples/dbt_test_gattcharlifecycle01.cpp
+++ b/examples/dbt_test_gattcharlifecycle01.cpp
@@ -533,9 +533,6 @@ static bool initAdapter(std::shared_ptr<BTAdapter>& adapter) {
}
std::shared_ptr<AdapterStatusListener> asl(new MyAdapterStatusListener());
adapter->addStatusListener( asl );
- // Flush discovered devices after registering our status listener.
- // This avoids discovered devices before we have registered!
- adapter->removeDiscoveredDevices();
if( !startDiscovery(adapter.get(), "initAdapter") ) {
adapter->removeStatusListener( asl );
diff --git a/examples/java/DBTPeripheral00.java b/examples/java/DBTPeripheral00.java
index 0ba90011..3dc9412a 100644
--- a/examples/java/DBTPeripheral00.java
+++ b/examples/java/DBTPeripheral00.java
@@ -709,9 +709,6 @@ public class DBTPeripheral00 {
// adapter is powered-on
final AdapterStatusListener asl = new MyAdapterStatusListener();
adapter.addStatusListener( asl );
- // Flush discovered devices after registering our status listener.
- // This avoids discovered devices before we have registered!
- adapter.removeDiscoveredDevices();
adapter.setServerConnSecurity(adapter_sec_level, SMPIOCapability.UNSET);