diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-18 18:00:44 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-18 21:24:44 +0100 |
commit | b274a83bf4f44d0e2642a8e3bd6bada4ccdbf83c (patch) | |
tree | 4c9e0c783d7698c3673cc5fc8c5c283f3bb80eb5 /src/bluetooth/qlowenergycontroller_bluez.cpp | |
parent | e0ef4fbc2e70622c25692262972b0dc2396af4ef (diff) | |
parent | 8cece5f6e09010de4bebd1a2ef524e2ca55d8a5b (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
.qmake.conf
Change-Id: I6d2140aa8692bc7ce56f4366275fd02d008900f0
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_bluez.cpp')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_bluez.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp index 003aff38..d038a8e8 100644 --- a/src/bluetooth/qlowenergycontroller_bluez.cpp +++ b/src/bluetooth/qlowenergycontroller_bluez.cpp @@ -346,8 +346,8 @@ void QLowEnergyControllerPrivate::handleGattRequestTimeout() } if (!openRequests.isEmpty() && requestPending) { - requestPending = false; // reset pending flag const Request currentRequest = openRequests.dequeue(); + requestPending = false; // reset pending flag qCWarning(QT_BT_BLUEZ).nospace() << "****** Request type 0x" << hex << currentRequest.command << " to server/peripheral timed out"; @@ -372,7 +372,6 @@ void QLowEnergyControllerPrivate::handleGattRequestTimeout() case ATT_OP_EXCHANGE_MTU_REQUEST: // MTU change request // never received reply to MTU request // it is safe to skip and go to next request - sendNextPendingRequest(); break; case ATT_OP_READ_BY_GROUP_REQUEST: // primary or secondary service discovery case ATT_OP_READ_BY_TYPE_REQUEST: // characteristic or included service discovery @@ -406,8 +405,13 @@ void QLowEnergyControllerPrivate::handleGattRequestTimeout() break; default: // not a command used by central role implementation - return; + qCWarning(QT_BT_BLUEZ) << "Missing response for ATT peripheral command: " + << hex << command; + break; } + + // spin openRequest queue further + sendNextPendingRequest(); } } @@ -1244,9 +1248,9 @@ void QLowEnergyControllerPrivate::processReply( } else if (!isServiceDiscoveryRun) { // not encryption problem -> abort readCharacteristic()/readDescriptor() run if (!descriptorHandle) - emit service->error(QLowEnergyService::CharacteristicReadError); + service->setError(QLowEnergyService::CharacteristicReadError); else - emit service->error(QLowEnergyService::DescriptorReadError); + service->setError(QLowEnergyService::DescriptorReadError); } } else { if (!descriptorHandle) |