summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-02-20 16:18:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-20 16:42:54 +0100
commitebb35fd588cd2294a7804193c2590a0fd4b5ccd2 (patch)
treedad668fc26d6daab007e9d115763904e60910dc1
parent44c971ef3a6df856e96d48f5adca87d9d8e3483a (diff)
Don't refuse the connect attempt while in ServiceLookupState.
QBluetoothSocket::connectToService can be called by itself when it does an SDP discovery. This affects Bluez only but the bug was introduced by the Android port. Change-Id: I1c9b0504acaafc7dbf2fc3d94b0c2c20a0cb8c65 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
-rw-r--r--src/bluetooth/qbluetoothsocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket.cpp b/src/bluetooth/qbluetoothsocket.cpp
index c7aea0b7..42a9c870 100644
--- a/src/bluetooth/qbluetoothsocket.cpp
+++ b/src/bluetooth/qbluetoothsocket.cpp
@@ -313,7 +313,7 @@ void QBluetoothSocket::connectToService(const QBluetoothServiceInfo &service, Op
{
Q_D(QBluetoothSocket);
- if (state() != QBluetoothSocket::UnconnectedState) {
+ if (state() != QBluetoothSocket::UnconnectedState && state() != QBluetoothSocket::ServiceLookupState) {
qCWarning(QT_BT) << "QBluetoothSocket::connectToService called on busy socket";
d->errorString = QBluetoothSocket::tr("Trying to connect while connection is in progress");
setSocketError(QBluetoothSocket::OperationError);