diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-02-20 16:18:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-20 16:42:54 +0100 |
commit | ebb35fd588cd2294a7804193c2590a0fd4b5ccd2 (patch) | |
tree | dad668fc26d6daab007e9d115763904e60910dc1 /src | |
parent | 44c971ef3a6df856e96d48f5adca87d9d8e3483a (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>
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/qbluetoothsocket.cpp | 2 |
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); |