diff options
author | Sven Gothel <[email protected]> | 2020-09-23 02:12:44 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-09-23 02:12:44 +0200 |
commit | dc8d8cfa902c0629752d0a34e051dd03cecb523a (patch) | |
tree | 175206e3c481233184e79b6ea51afb239ca12b7c /src | |
parent | 02909e574ad5b6900cddcc4c7f231257fe3124c3 (diff) |
DBTAdapter.java: poweredOff(): Don't clear discoveredDevices (!references); Have !POWERED come past settings notification
Diffstat (limited to 'src')
-rw-r--r-- | src/direct_bt/DBTAdapter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/direct_bt/DBTAdapter.cpp b/src/direct_bt/DBTAdapter.cpp index efcd413f..f33b2722 100644 --- a/src/direct_bt/DBTAdapter.cpp +++ b/src/direct_bt/DBTAdapter.cpp @@ -704,13 +704,14 @@ bool DBTAdapter::mgmtEvNewSettingsMgmt(std::shared_ptr<MgmtEvent> e) { } } + sendAdapterSettingsChanged(old_settings, adapterInfo->getCurrentSetting(), event.getTimestamp()); + if( !isPowered() ) { // Adapter has been powered off, close connections and cleanup off-thread. std::thread bg(&DBTAdapter::poweredOff, this); bg.detach(); } - sendAdapterSettingsChanged(old_settings, adapterInfo->getCurrentSetting(), event.getTimestamp()); return true; } |