summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-05-10 08:19:47 +0200
committerAndy Shaw <andy.shaw@qt.io>2019-05-10 09:59:50 +0000
commit14b0efe1d4e5addec5f577a2d01a3a0d9a1d931b (patch)
tree7f83951a92acbd5ea963007ddd5cf3701ac6afe7 /src
parent3d0ac0c8e62e141f1e3300ac9b637d68bcc37ba7 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent.cpp3
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;
}
}