summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-02-13 10:54:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-13 16:26:19 +0100
commit9902dfdbc44934ce2e8072bc237ca8cdbfb3402b (patch)
tree2384c7087365ef6255a7d53d3609635389fa28e9
parent7fde60d9bedb815b66d374328d6535d10c701775 (diff)
Fix missing QBluetoothSocket::state update after unsuccessful SDP searchold/5.2
When connectToService() triggers an SDP discovery the search may fail. At the beginning of the discovery the socket state was set to ServiceLookupState. This patch ensures that the socket state resets to Unconnected if the SDP discovery failed. Currently only Bluez uses this discovery mechanism and therefore is the only affected platform. Change-Id: I982dafc1f5466071bbf910ed3cf7cf7abda14fe4 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
-rw-r--r--src/bluetooth/qbluetoothsocket.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothsocket.cpp b/src/bluetooth/qbluetoothsocket.cpp
index 2f2660d0..73d82591 100644
--- a/src/bluetooth/qbluetoothsocket.cpp
+++ b/src/bluetooth/qbluetoothsocket.cpp
@@ -548,6 +548,7 @@ void QBluetoothSocket::discoveryFinished()
qCDebug(QT_BT) << "Didn't find any";
d->errorString = tr("Service cannot be found");
setSocketError(ServiceNotFoundError);
+ setSocketState(QBluetoothSocket::UnconnectedState);
d->discoveryAgent->deleteLater();
d->discoveryAgent = 0;
}