diff options
author | Sven Gothel <[email protected]> | 2022-02-02 17:08:55 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-02-02 17:08:55 +0100 |
commit | 0c8dadba43b4b69f212ae61f4235bc9270eacfe9 (patch) | |
tree | 0811c6f841dd389e272deae8951c1d16dc7eab29 /src/direct_bt/BTAdapter.cpp | |
parent | baeabcbaadb8bd6ffa1d30e1c72d12c57d96dd4d (diff) |
BTAdapter::mgmtEvDeviceConnectedHCI: No last_discovery update; mgmtEvDeviceFoundHCI: Update last_discovery on re-discovered device
Diffstat (limited to 'src/direct_bt/BTAdapter.cpp')
-rw-r--r-- | src/direct_bt/BTAdapter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/direct_bt/BTAdapter.cpp b/src/direct_bt/BTAdapter.cpp index c92ce856..b3fd105d 100644 --- a/src/direct_bt/BTAdapter.cpp +++ b/src/direct_bt/BTAdapter.cpp @@ -1852,9 +1852,6 @@ bool BTAdapter::mgmtEvDeviceConnectedHCI(const MgmtEvent& e) noexcept { device->toString().c_str()); } else { addConnectedDevice(device); // track device, if not done yet - if( 2 <= new_connect ) { - device->ts_last_discovery = ad_report.getTimestamp(); - } COND_PRINT(debug_event, "BTAdapter::EventHCI:DeviceConnected(dev_id %d, new_connect %d, updated %s): %s, handle %s -> %s,\n %s,\n -> %s", dev_id, new_connect, to_string(updateMask).c_str(), event.toString().c_str(), jau::to_hexstring(device->getConnectionHandle()).c_str(), jau::to_hexstring(event.getHCIHandle()).c_str(), @@ -2321,6 +2318,7 @@ bool BTAdapter::mgmtEvDeviceFoundHCI(const MgmtEvent& e) noexcept { // Already discovered device // const EIRDataType updateMask = dev_discovered->update(*eir); + dev_discovered->ts_last_discovery = eir->getTimestamp(); if( nullptr == dev_shared ) { // // Discovered but not a shared device, |