From 2b9c8dffa2cb6d4e9b273c897f9f45355bb8d516 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Tue, 11 Dec 2018 01:49:38 -0800 Subject: binding: bluetooth: don't display errors if no error pointer is passed There is sometimes when you don't want AFB_ERROR to be displayed on a dbus failure. Example would be in the initial autoconnect attempt on binding startup. Don't display the AFB_ERROR if error pointer that is passed is NULL Bug-AGL: SPEC-1630 SPEC-1986 Change-Id: I2bc1e8575037a8e84721d2c2c369a409986eda43 Signed-off-by: Matt Ranostay --- binding/bluetooth-bluez.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binding/bluetooth-bluez.c b/binding/bluetooth-bluez.c index fa6d34b..18194d5 100644 --- a/binding/bluetooth-bluez.c +++ b/binding/bluetooth-bluez.c @@ -241,8 +241,8 @@ GVariant *bluez_call(struct bluetooth_state *ns, NULL, error); bluez_decode_call_error(ns, access_type, path, method, error); - if (!reply) { - if (error && *error) + if (!reply && error) { + if (*error) g_dbus_error_strip_remote_error(*error); AFB_ERROR("Error calling %s%s%s %s method %s", access_type, -- cgit 1.2.3-korg