summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_bluez.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-08-22 09:56:56 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-09-02 20:18:09 +0200
commitbb4de7e992fc673884db553977b2756a165278b5 (patch)
tree0c0a9e56cc2f766ac13d76338bf64f3b52247222 /src/bluetooth/qlowenergycontroller_bluez.cpp
parent6837d143b456eb1f253b68704a5ff1b48bef4de4 (diff)
Add a way to detect that the QLEController is performing a discovery
Change-Id: Ie3146c136461ad4ecde4169f3b30dda0c814ca7b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_bluez.cpp')
-rw-r--r--src/bluetooth/qlowenergycontroller_bluez.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp
index 8f157f04..2540791f 100644
--- a/src/bluetooth/qlowenergycontroller_bluez.cpp
+++ b/src/bluetooth/qlowenergycontroller_bluez.cpp
@@ -451,10 +451,12 @@ void QLowEnergyControllerPrivate::processReply(
const quint16 type = request.reference.toUInt();
if (isErrorResponse) {
- if (type == GATT_SECONDARY_SERVICE)
+ if (type == GATT_SECONDARY_SERVICE) {
+ setState(QLowEnergyController::DiscoveredState);
q->discoveryFinished();
- else // search for secondary services
+ } else { // search for secondary services
sendReadByGroupRequest(0x0001, 0xFFFF, GATT_SECONDARY_SERVICE);
+ }
break;
}
@@ -497,10 +499,12 @@ void QLowEnergyControllerPrivate::processReply(
if (end != 0xFFFF) {
sendReadByGroupRequest(end+1, 0xFFFF, type);
} else {
- if (type == GATT_SECONDARY_SERVICE)
+ if (type == GATT_SECONDARY_SERVICE) {
+ setState(QLowEnergyController::DiscoveredState);
emit q->discoveryFinished();
- else // search for secondary services
+ } else { // search for secondary services
sendReadByGroupRequest(0x0001, 0xFFFF, GATT_SECONDARY_SERVICE);
+ }
}
}
break;