summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-04-01 17:17:22 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-04-15 05:44:26 +0000
commit5be8b3d9273afcd41c6c60e6f6d2dfd5cd8b30e3 (patch)
tree08ec49c6cb04c0be06b8e3d73a384287f0946f00 /tests/auto
parent99d62bcce229ab2807f0ea5b8a0f618b4e93c665 (diff)
Always read/write the GATT hardware even if meta data reports otherwise
It is possible that a ATT attribute is not readable or writable. Usually this is reported via descriptors or other types of meta data. However it is possible that the meta data is reporting the wrong information. Therefore we always ensure that every read and write request is forwarded to the hardware. It is up to the hardware to respond to such requests. This change keeps the device usable in cases of buggy device meta data. This only affected writeCharacteristic() calls. Change-Id: Ieb2b95f47aa51c86a8ae7c4bebed4043d7478874 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
index 7e96c204..5d7339a7 100644
--- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
+++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp
@@ -1801,8 +1801,8 @@ void tst_QLowEnergyController::tst_writeCharacteristic()
QTRY_VERIFY_WITH_TIMEOUT(!errorSpy.isEmpty(), 10000);
QCOMPARE(errorSpy[0].at(0).value<QLowEnergyService::ServiceError>(),
- QLowEnergyService::OperationError);
- QCOMPARE(service->error(), QLowEnergyService::OperationError);
+ QLowEnergyService::CharacteristicWriteError);
+ QCOMPARE(service->error(), QLowEnergyService::CharacteristicWriteError);
QCOMPARE(writeSpy.count(), 0);
QCOMPARE(dataChar.value(), QByteArray::fromHex("3f00"));