diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-06-29 14:08:42 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-06-29 12:38:52 +0000 |
commit | 29b98ef4a4a34497cfcb6091554809673024340e (patch) | |
tree | 7ad9109da5aa1ba3d187bae05e4d1748d390466a | |
parent | 0148c476bbc407c00d40f65f9e166226043ec5cf (diff) |
Device discovery (CoreBluetooth): report duplicates in case LE scan has timeout 0
If we have a never-ending LE scan, we should report even complete duplicates.
The original bug-report has a scenario with a long-running application, that
records a data from BTLE scales once a day.
Task-number: QTBUG-57847
Change-Id: If5e4828f119d5f4e4418cfe60fa518b583210a14
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm index b308f7cc..9e3f6a57 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm @@ -525,7 +525,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::deviceFound(const QBluetoothDeviceIn for (int i = 0, e = discoveredDevices.size(); i < e; ++i) { if (isLE ? discoveredDevices[i].deviceUuid() == newDeviceInfo.deviceUuid(): discoveredDevices[i].address() == newDeviceInfo.address()) { - if (discoveredDevices[i] == newDeviceInfo) + if (discoveredDevices[i] == newDeviceInfo && (!isLE || lowEnergySearchTimeout > 0)) return; discoveredDevices.replace(i, newDeviceInfo); |