From d80fef6b31053e02c1f6ca8b91d139beb24c3960 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Wed, 15 May 2024 10:33:15 +0200 Subject: [PATCH] Fix a crash during disconnection Resolves: RHEL-30212 --- ...rd-Do-not-crash-during-disconnection.patch | 31 +++++++++++++++++++ gnome-connections.spec | 7 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-clipboard-Do-not-crash-during-disconnection.patch diff --git a/0001-clipboard-Do-not-crash-during-disconnection.patch b/0001-clipboard-Do-not-crash-during-disconnection.patch new file mode 100644 index 0000000..d42cf32 --- /dev/null +++ b/0001-clipboard-Do-not-crash-during-disconnection.patch @@ -0,0 +1,31 @@ +From cb992cb5b3099fdb4106d558f1aeba908267a075 Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Tue, 9 Apr 2024 11:01:01 +0200 +Subject: [PATCH] clipboard: Do not crash during disconnection + +Disconnect handler of "owner-change" in finalize of +FrdpChannelClipboard so that the handler is not called +after the clipboard is finalized. + +Fixes #50 +--- + src/frdp-channel-clipboard.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/frdp-channel-clipboard.c b/src/frdp-channel-clipboard.c +index 2723c2d..ef82dbe 100644 +--- a/subprojects/gtk-frdp/src/frdp-channel-clipboard.c ++++ b/subprojects/gtk-frdp/src/frdp-channel-clipboard.c +@@ -203,6 +203,9 @@ frdp_channel_clipboard_finalize (GObject *object) + FrdpChannelClipboard *self = (FrdpChannelClipboard *) object; + FrdpChannelClipboardPrivate *priv = frdp_channel_clipboard_get_instance_private (self); + ++ g_signal_handler_disconnect (priv->gtk_clipboard, ++ priv->clipboard_owner_changed_id); ++ + g_hash_table_unref (priv->remote_files_requests); + fuse_session_unmount (priv->fuse_session); + fuse_session_exit (priv->fuse_session); +-- +2.44.0 + diff --git a/gnome-connections.spec b/gnome-connections.spec index ca40206..f6142d6 100644 --- a/gnome-connections.spec +++ b/gnome-connections.spec @@ -7,12 +7,13 @@ Name: gnome-connections Version: 46.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A remote desktop client for the GNOME desktop environment License: GPL-3.0-or-later URL: https://gitlab.gnome.org/gnome/connections/-/wikis/home Source0: https://download.gnome.org/sources/gnome-connections/%{url_ver}/gnome-connections-%{tarball_version}.tar.xz +Patch0: 0001-clipboard-Do-not-crash-during-disconnection.patch BuildRequires: desktop-file-utils BuildRequires: gcc @@ -83,6 +84,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Connections %{_datadir}/mime/packages/org.gnome.Connections.xml %changelog +* Wed May 15 2024 Marek Kasik - 46.0-2 +- Fix a crash during disconnection +- Resolves: RHEL-30212 + * Thu Mar 21 2024 Marek Kasik - 46.0-1 - Update to 46.0 - Use FreeRDP 3