summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-07-06 15:10:31 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-07-13 09:08:29 +0000
commitadfed1222fbe73267f4a3be149d9acff158ddfa1 (patch)
tree2c9ece953e2671dbe8bff2ad325ec9c7a10e8f7b /src
parent3807f631e0fee4fd2e87353b3578a580dbf8cb00 (diff)
Parse all char descriptions in one go
ATT_OP_READ_BY_TYPE_REQUEST may return more than one char description per response packet. Due to a missing offset adjustment we only ever read the first description. Subsequent description were read by issuing a new READ_BY_TYPE request. This is very inefficient as at worst 3 times as many requests had to be send to the device. Change-Id: I83ca75a42425fe230926411f068112865c249061 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qlowenergycontroller_bluez.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp
index a35545b0..8906eb06 100644
--- a/src/bluetooth/qlowenergycontroller_bluez.cpp
+++ b/src/bluetooth/qlowenergycontroller_bluez.cpp
@@ -672,6 +672,7 @@ void QLowEnergyControllerPrivate::processReply(
lastHandle = parseReadByTypeCharDiscovery(
&characteristic, &data[offset], elementLength);
p->characteristicList[lastHandle] = characteristic;
+ offset += elementLength;
} else if (attributeType == GATT_INCLUDED_SERVICE) {
QList<QBluetoothUuid> includedServices;
lastHandle = parseReadByTypeIncludeDiscovery(