diff options
author | Andy Shaw <andy.shaw@qt.io> | 2019-05-10 08:19:47 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-05-10 09:59:50 +0000 |
commit | 14b0efe1d4e5addec5f577a2d01a3a0d9a1d931b (patch) | |
tree | 7f83951a92acbd5ea963007ddd5cf3701ac6afe7 | |
parent | 3d0ac0c8e62e141f1e3300ac9b637d68bcc37ba7 (diff) | |
download | qtconnectivity-14b0efe1d4e5addec5f577a2d01a3a0d9a1d931b.tar.gz |
Bluetooth: Compare the server channel when checking for duplicates
It is possible that the service will appear to be the same but have
different server channels. So these services should not be seen as
duplicates as a result.
Change-Id: I36f9c376fcfd9378f4f18c639e87e1a7aad1815b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r-- | src/bluetooth/qbluetoothservicediscoveryagent.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent.cpp b/src/bluetooth/qbluetoothservicediscoveryagent.cpp index 0f6fdc63..53ce98e5 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent.cpp @@ -573,7 +573,8 @@ bool QBluetoothServiceDiscoveryAgentPrivate::isDuplicatedService( const QBluetoothServiceInfo &info = discoveredServices.at(j); if (info.device() == serviceInfo.device() && info.serviceClassUuids() == serviceInfo.serviceClassUuids() - && info.serviceUuid() == serviceInfo.serviceUuid()) { + && info.serviceUuid() == serviceInfo.serviceUuid() + && info.serverChannel() == serviceInfo.serverChannel()) { return true; } } |