forked from pool/wireplumber
Accepting request 989110 from home:favogt:branches:multimedia:libs
- Add patch to fix crash on session end: * 0001-dbus-fix-crash-when-trying-to-reconnect.patch OBS-URL: https://build.opensuse.org/request/show/989110 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=49
This commit is contained in:
parent
14359d1f6b
commit
23c7921307
51
0001-dbus-fix-crash-when-trying-to-reconnect.patch
Normal file
51
0001-dbus-fix-crash-when-trying-to-reconnect.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From eb406bdb2cbbcd49c55c71285f8f2eddb624d24b Mon Sep 17 00:00:00 2001
|
||||||
|
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
|
||||||
|
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
|
||||||
|
---
|
||||||
|
lib/wp/dbus.c | 20 ++++++++++++++++----
|
||||||
|
1 file changed, 16 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/wp/dbus.c b/lib/wp/dbus.c
|
||||||
|
index 01a3b21..7c2d023 100644
|
||||||
|
--- 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 14 08:35:10 UTC 2022 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
- Add patch to fix crash on session end:
|
||||||
|
* 0001-dbus-fix-crash-when-trying-to-reconnect.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 8 11:02:44 UTC 2022 - Fabian Vogt <fvogt@suse.com>
|
Fri Jul 8 11:02:44 UTC 2022 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ Source1: split-config-file.py
|
|||||||
Patch0: reduce-meson-required-version.patch
|
Patch0: reduce-meson-required-version.patch
|
||||||
# PATCH-FIX-UPSTREAM
|
# PATCH-FIX-UPSTREAM
|
||||||
Patch1: fix-alsa.patch
|
Patch1: fix-alsa.patch
|
||||||
|
Patch2: 0001-dbus-fix-crash-when-trying-to-reconnect.patch
|
||||||
# docs
|
# docs
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: graphviz
|
BuildRequires: graphviz
|
||||||
@ -143,6 +144,7 @@ the wireplumber shared library.
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
pushd src/config/main.lua.d
|
pushd src/config/main.lua.d
|
||||||
python3 %{SOURCE1}
|
python3 %{SOURCE1}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user