From 2d5fd1dd4910d46f935776f1f6f475de11367ef2 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 20 Jul 2022 02:40:19 +0100 Subject: gentoo auto-resync : 20:07:2022 - 02:40:19 --- .../wireplumber-0.4.11-dbus-reconnect-crash.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch (limited to 'media-video/wireplumber/files') diff --git a/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch b/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch new file mode 100644 index 000000000000..6098ed11c302 --- /dev/null +++ b/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch @@ -0,0 +1,45 @@ +https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/eb406bdb2cbbcd49c55c71285f8f2eddb624d24b + +From eb406bdb2cbbcd49c55c71285f8f2eddb624d24b Mon Sep 17 00:00:00 2001 +From: George Kiagiadakis +Date: Wed, 13 Jul 2022 13:38:14 +0300 +Subject: [PATCH] dbus: fix crash when trying to reconnect + +When coming from on_sync_reconnect, data points to the WpDBus object +instead of the activation transition. + +Fixes: #305 +--- a/lib/wp/dbus.c ++++ b/lib/wp/dbus.c +@@ -58,14 +58,26 @@ wp_dbus_set_state (WpDbus *self, WpDBusState new_state) + static void + on_got_bus (GObject * obj, GAsyncResult * res, gpointer data) + { +- WpTransition *transition = WP_TRANSITION (data); +- WpDbus *self = wp_transition_get_source_object (transition); ++ WpTransition *transition; ++ WpDbus *self; + g_autoptr (GError) error = NULL; + ++ if (WP_IS_TRANSITION (data)) { ++ // coming from wp_dbus_enable ++ transition = WP_TRANSITION (data); ++ self = wp_transition_get_source_object (transition); ++ } else { ++ // coming from on_sync_reconnect ++ transition = NULL; ++ self = WP_DBUS (data); ++ } ++ + self->connection = g_dbus_connection_new_for_address_finish (res, &error); + if (!self->connection) { +- g_prefix_error (&error, "Failed to connect to bus: "); +- wp_transition_return_error (transition, g_steal_pointer (&error)); ++ if (transition) { ++ g_prefix_error (&error, "Failed to connect to bus: "); ++ wp_transition_return_error (transition, g_steal_pointer (&error)); ++ } + return; + } + +GitLab -- cgit v1.2.3