From 5ec040edceef63fa71b50b3584d6712047c0f9e6 Mon Sep 17 00:00:00 2001 From: Kevron Rees Date: Fri, 16 May 2014 14:58:04 -0700 Subject: [PATCH] check if registerProfile is valid --- plugins/bluetooth/bluetoothplugin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/bluetooth/bluetoothplugin.cpp b/plugins/bluetooth/bluetoothplugin.cpp index 86ca0d9..e3558bd 100644 --- a/plugins/bluetooth/bluetoothplugin.cpp +++ b/plugins/bluetooth/bluetoothplugin.cpp @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include #include +#include using namespace std; @@ -94,7 +95,12 @@ BtProfileAdaptor::BtProfileAdaptor(BluetoothSinkPlugin *parent) options["Name"] = "spp"; options["Role"] = "server"; - profileManagerIface.call("RegisterProfile", "/org/bluez/spp", "00001101-0000-1000-8000-00805F9B34FB", options); + QDBusReply reply = profileManagerIface.call("RegisterProfile", "/org/bluez/spp", "00001101-0000-1000-8000-00805F9B34FB", options); + + if(!reply.isValid()) + { + DebugOut(DebugOut::Error)<<"RegisterProfile call failed: "<