From a66aa7ae846844ca2811f5c79fe976a30025d4d7 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Mon, 25 Mar 2024 09:29:07 +0200 Subject: [PATCH] bluez: print a nicer warning when the bluez service is not available --- spa/plugins/bluez5/bluez5-dbus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spa/plugins/bluez5/bluez5-dbus.c b/spa/plugins/bluez5/bluez5-dbus.c index 82a2c85bf..ca0a98bd9 100644 --- a/spa/plugins/bluez5/bluez5-dbus.c +++ b/spa/plugins/bluez5/bluez5-dbus.c @@ -5328,6 +5328,11 @@ static void get_managed_objects_reply(DBusPendingCall *pending, void *user_data) return; } + if (dbus_message_is_error(r, DBUS_ERROR_NAME_HAS_NO_OWNER)) { + spa_log_warn(monitor->log, "BlueZ system service is not available"); + return; + } + if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) { spa_log_error(monitor->log, "GetManagedObjects() failed: %s", dbus_message_get_error_name(r));