File 0007-utils-Add-helper-to-close-connection-and-notify.patch of Package gnome-remote-desktop
From 800ea5c29fac579fc6660175075d3333a2d9786c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Mon, 30 Jun 2025 16:16:31 +0200
Subject: [PATCH 07/13] utils: Add helper to close connection and notify
Closing doesn't notify that it was closed, so lets add a helper that
does so, that we then can uses to rely on the closed property being up
to date.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/merge_requests/321>
---
src/grd-utils.c | 7 +++++++
src/grd-utils.h | 2 ++
2 files changed, 9 insertions(+)
diff -urp gnome-remote-desktop-45.1.orig/src/grd-utils.c gnome-remote-desktop-45.1/src/grd-utils.c
--- gnome-remote-desktop-45.1.orig/src/grd-utils.c 2026-02-10 19:57:07.927874328 -0600
+++ gnome-remote-desktop-45.1/src/grd-utils.c 2026-02-10 20:20:38.447702230 -0600
@@ -150,3 +150,10 @@ grd_create_fd_source (int fd
return source;
}
+
+void
+grd_close_connection_and_notify (GSocketConnection *connection)
+{
+ g_io_stream_close (G_IO_STREAM (connection), NULL, NULL);
+ g_object_notify (G_OBJECT (connection), "closed");
+}
diff -urp gnome-remote-desktop-45.1.orig/src/grd-utils.h gnome-remote-desktop-45.1/src/grd-utils.h
--- gnome-remote-desktop-45.1.orig/src/grd-utils.h 2026-02-10 20:19:53.961929871 -0600
+++ gnome-remote-desktop-45.1/src/grd-utils.h 2026-02-10 20:21:01.416089616 -0600
@@ -55,6 +55,7 @@ GSource * grd_create_fd_source (int
gpointer user_data,
GDestroyNotify notify);
+void grd_close_connection_and_notify (GSocketConnection *connection);
static inline int64_t
us (int64_t us)