From a980a15849f12b4ec5a069c90fa5c080295daa02 Mon Sep 17 00:00:00 2001 From: Nedim Hadzic Date: Tue, 25 Feb 2014 14:53:41 +0100 Subject: 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 --- src/bluetooth/qbluetoothserver_qnx.cpp | 3 ++- src/bluetooth/qbluetoothsocket_p.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3