summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNedim Hadzic <nhadzic@blackberry.com>2014-02-25 14:53:41 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-26 11:00:21 +0100
commita980a15849f12b4ec5a069c90fa5c080295daa02 (patch)
treee565a8b44d1bd34f262ca11a372100c5131d6f3e
parentc969ca25b29ef1e1de634c60421b7f196a25b48c (diff)
downloadqtconnectivity-a980a15849f12b4ec5a069c90fa5c080295daa02.tar.gz
QNX QBluetoothSocket state fix
Wrong socket state order fix. Due to this, the socket was not keeping remote device info. Change-Id: I860f15af9de4eb2e1238989d33bc59d62536f7aa Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--src/bluetooth/qbluetoothserver_qnx.cpp3
-rw-r--r--src/bluetooth/qbluetoothsocket_p.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothserver_qnx.cpp b/src/bluetooth/qbluetoothserver_qnx.cpp
index 9c6f9256..3f67d59d 100644
--- a/src/bluetooth/qbluetoothserver_qnx.cpp
+++ b/src/bluetooth/qbluetoothserver_qnx.cpp
@@ -95,7 +95,8 @@ void QBluetoothServerPrivate::controlReply(ppsResult result)
socket->setSocketDescriptor(socketFD, QBluetoothServiceInfo::RfcommProtocol,
QBluetoothSocket::ConnectedState);
- socket->connectToService(QBluetoothAddress(nextClientAddress), m_uuid);
+ socket->d_ptr->m_peerAddress = QBluetoothAddress(nextClientAddress);
+ socket->d_ptr->m_uuid = m_uuid;
activeSockets.append(socket);
socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol, this);
socket->setSocketState(QBluetoothSocket::ListeningState);
diff --git a/src/bluetooth/qbluetoothsocket_p.h b/src/bluetooth/qbluetoothsocket_p.h
index 95e67e51..bafbf033 100644
--- a/src/bluetooth/qbluetoothsocket_p.h
+++ b/src/bluetooth/qbluetoothsocket_p.h
@@ -87,6 +87,8 @@ class QBluetoothSocketPrivate
{
#endif
Q_DECLARE_PUBLIC(QBluetoothSocket)
+ friend class QBluetoothServerPrivate;
+
public:
QBluetoothSocketPrivate();