summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-07-14 12:23:31 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-07-16 08:28:53 +0200
commit57bd8b4728da731a5f35dc15cf8a46deb21a25b0 (patch)
tree37e860901377c669173091cb0f842654a1f68fb8
parent5e6a8d2dceb69f32a4c80be34917da2d9eaea623 (diff)
Ignore unexpected server messages
Some BTLE servers (e.g. the tested CSR development kit) send requests to the BTLE client although they shouldn't according to the spec. Most likely they are due to firmware bugs. Too avoid that those messages confuse the message handlers they are being filtered out (ignored). Change-Id: I60c75ef9c5316d680ce7119aada2fb1ab6161eba Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
-rw-r--r--src/bluetooth/qlowenergycontrollernew_bluez.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontrollernew_bluez.cpp b/src/bluetooth/qlowenergycontrollernew_bluez.cpp
index af2ec9f7..767933ca 100644
--- a/src/bluetooth/qlowenergycontrollernew_bluez.cpp
+++ b/src/bluetooth/qlowenergycontrollernew_bluez.cpp
@@ -286,6 +286,15 @@ void QLowEnergyControllerNewPrivate::l2cpReadyRead()
processUnsolicitedReply(reply);
return;
}
+ case ATT_OP_EXCHANGE_MTU_REQUEST:
+ case ATT_OP_READ_BY_GROUP_REQUEST:
+ case ATT_OP_READ_BY_TYPE_REQUEST:
+ case ATT_OP_READ_REQUEST:
+ case ATT_OP_FIND_INFORMATION_REQUEST:
+ case ATT_OP_WRITE_REQUEST:
+ qCWarning(QT_BT_BLUEZ) << "Unexpected message type" << hex << command
+ << "will be ignored" ;
+ return;
default:
//only solicited replies finish pending requests
requestPending = false;