summaryrefslogtreecommitdiff
path: root/sapbtlistener.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sapbtlistener.cc')
-rw-r--r--sapbtlistener.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sapbtlistener.cc b/sapbtlistener.cc
index 2265516..cd8c015 100644
--- a/sapbtlistener.cc
+++ b/sapbtlistener.cc
@@ -131,7 +131,6 @@ void SAPBTListener::nudge(const QBluetoothAddress &address)
OrgBluezDeviceInterface device("org.bluez", item.path(), bus);
QVariantMap properties = device.GetProperties();
QBluetoothAddress devAddress(properties["Address"].toString());
- qDebug() << "Found bluez device with address" << devAddress.toString();
if (devAddress == address) {
OrgBluezHeadsetInterface headset("org.bluez", item.path(), bus);
qDebug() << "Creating HFP connection to" << devAddress.toString();
@@ -163,7 +162,8 @@ void SAPBTListener::acceptConnection()
qDebug() << "Got connection";
// TODO Why am I hardcoding the role here
- new SAPBTPeer(SAProtocol::ClientRole, socket, this);
+ SAPBTPeer *peer = new SAPBTPeer(SAProtocol::ClientRole, socket, this);
+ connect(peer, SIGNAL(disconnected()), peer, SLOT(deleteLater()));
}
void SAPBTListener::handleNudgeConnected()