From 5e47838f24f6661a9c34c3898520c5b2a739fefd Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 16 Oct 2024 23:41:23 +0300 Subject: [PATCH] bluez5: don't exit if system DBus goes down Similarly as in spa_dbus, don't exit if bus goes down. Neither the audio or midi Bluetooth backend reconnects to DBus, but they shouldn't exit the process. --- spa/plugins/bluez5/midi-enum.c | 2 ++ spa/plugins/bluez5/midi-node.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/spa/plugins/bluez5/midi-enum.c b/spa/plugins/bluez5/midi-enum.c index 588ba01a2..9ef7d2bf5 100644 --- a/spa/plugins/bluez5/midi-enum.c +++ b/spa/plugins/bluez5/midi-enum.c @@ -808,6 +808,8 @@ impl_init(const struct spa_handle_factory *factory, goto fail; } + g_dbus_connection_set_exit_on_close(this->conn, FALSE); + this->manager = g_dbus_object_manager_server_new(MIDI_OBJECT_PATH); if (!this->manager){ spa_log_error(this->log, "Creating GDBus object manager failed"); diff --git a/spa/plugins/bluez5/midi-node.c b/spa/plugins/bluez5/midi-node.c index 317b0294b..af8c9aa6a 100644 --- a/spa/plugins/bluez5/midi-node.c +++ b/spa/plugins/bluez5/midi-node.c @@ -1979,6 +1979,8 @@ impl_init(const struct spa_handle_factory *factory, goto fail; } + g_dbus_connection_set_exit_on_close(this->conn, FALSE); + this->node.iface = SPA_INTERFACE_INIT( SPA_TYPE_INTERFACE_Node, SPA_VERSION_NODE,