summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2012-11-23 19:29:10 +0100
committerAlex <ablasche@gmail.com>2012-11-27 04:48:59 +0100
commit36976cb4f5d894beb4689af054e0456b7c7a154f (patch)
tree4d6949d3ea288deccf8ab8268db92cca714bf403 /src/bluetooth/qbluetoothserviceinfo_qnx.cpp
parent159b646d7c2ab63d848e7f82abdefa5f4b777bb8 (diff)
QNX making the device discovery agent more robust
Change-Id: Ibb7da66092e0edca9ac3d7e801275de5d166d6d8 Reviewed-by: Alex <ablasche@gmail.com>
Diffstat (limited to 'src/bluetooth/qbluetoothserviceinfo_qnx.cpp')
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_qnx.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo_qnx.cpp b/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
index 774ba261..be8f01db 100644
--- a/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo_qnx.cpp
@@ -77,15 +77,10 @@ bool QBluetoothServiceInfo::unregisterService() const
QBluetoothServiceInfoPrivate::QBluetoothServiceInfoPrivate()
: registered(false)
{
- ppsRegisterControl();
}
QBluetoothServiceInfoPrivate::~QBluetoothServiceInfoPrivate()
{
- if (registered)
- ppsSendControlMessage("deregister_server", 0x1101, QBluetoothUuid(QStringLiteral("00000000-1111-2222-3334-444444444443")), QString(), 0);
-
- ppsUnregisterControl();
}
void QBluetoothServiceInfoPrivate::setRegisteredAttribute(quint16 attributeId, const QVariant &value) const
@@ -105,6 +100,7 @@ void QBluetoothServiceInfoPrivate::removeRegisteredAttribute(quint16 attributeId
bool QBluetoothServiceInfoPrivate::registerService() const
{
Q_Q(const QBluetoothServiceInfo);
+ ppsRegisterControl();
if (registered)
ppsSendControlMessage("deregister_server", 0x1101, QBluetoothUuid(QStringLiteral("00000000-1111-2222-3334-444444444443")), QString(), 0);
@@ -115,6 +111,7 @@ bool QBluetoothServiceInfoPrivate::registerService() const
ppsSendControlMessage("register_server", 0x1101, QBluetoothUuid(QStringLiteral("00000000-1111-2222-3334-444444444443")), QString(), 0);
registered = true;
+ ppsUnregisterControl(0);
return true;
}