diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-20 22:38:09 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-20 22:38:52 +0100 |
commit | 1653ae6e8782fb96999a53736a773e9a31d86b8a (patch) | |
tree | 33e114d791c9b9db48ceb79ffeb6c1ac7bab3493 /src/bluetooth/qlowenergycontroller_bluez.cpp | |
parent | 4462750a68cb93b5d363b6efdbe1d6a6f0e5811f (diff) | |
parent | b274a83bf4f44d0e2642a8e3bd6bada4ccdbf83c (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
.qmake.conf
Change-Id: I6e93fc7435a49b601a5c10519ed86d2a15125074
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 72f4c678..c4ff0e7f 100644 --- a/src/bluetooth/qlowenergycontroller_bluez.cpp +++ b/src/bluetooth/qlowenergycontroller_bluez.cpp @@ -343,8 +343,8 @@ void QLowEnergyControllerPrivateBluez::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"; @@ -369,7 +369,6 @@ void QLowEnergyControllerPrivateBluez::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 @@ -403,8 +402,13 @@ void QLowEnergyControllerPrivateBluez::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(); } } @@ -1241,9 +1245,9 @@ void QLowEnergyControllerPrivateBluez::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) |