From 11d2b5e5a2ff3662bcfb76243f001df8cb2662e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Sat, 7 Oct 2023 14:58:23 -0400 Subject: [PATCH] file-transfer: return a value from task - This fixes "GTask finalized without ever returning (using g_task_return_*()). This potentially indicates a bug in the program." errors. --- document-portal/file-transfer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/document-portal/file-transfer.c b/document-portal/file-transfer.c index 028a2109e..3f3a3136a 100644 --- a/document-portal/file-transfer.c +++ b/document-portal/file-transfer.c @@ -566,14 +566,17 @@ stop_file_transfers_in_thread_func (GTask *task, } } G_UNLOCK (transfers); + g_task_return_boolean (task, TRUE); } void stop_file_transfers_for_sender (const char *sender) { GTask *task; + g_autofree char *name = g_strdup_printf("stop_file_transfers_for_sender(%s)", sender); task = g_task_new (NULL, NULL, NULL, NULL); + g_task_set_name (task, name); g_task_set_task_data (task, g_strdup (sender), g_free); g_task_run_in_thread (task, stop_file_transfers_in_thread_func); g_object_unref (task);