gnome-session/gnome-session-Fix-inhibit-DBus.patch

39 lines
1.5 KiB
Diff

From c403cf95aabc408e2a7e987761f9dacd71c32067 Mon Sep 17 00:00:00 2001
From: Erik Inkinen <erik.inkinen@erikinkinen.fi>
Date: Tue, 12 Sep 2023 17:25:01 +0300
Subject: [PATCH] gsm-manager: Fix Inhibit DBus method handler
In case of an error, the DBus method handler should still return TRUE
to signify that this was the correct handler.
For an error in handling there request,
using g_dbus_method_invocation_take_error is sufficient.
---
gnome-session/gsm-manager.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 05e0d8d5..a19b7f52 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -3154,7 +3154,7 @@ gsm_manager_inhibit (GsmExportedManager *skeleton,
"Reason not specified");
g_debug ("GsmManager: Unable to inhibit: %s", new_error->message);
g_dbus_method_invocation_take_error (invocation, new_error);
- return FALSE;
+ return TRUE;
}
if (flags == 0) {
@@ -3165,7 +3165,7 @@ gsm_manager_inhibit (GsmExportedManager *skeleton,
"Invalid inhibit flags");
g_debug ("GsmManager: Unable to inhibit: %s", new_error->message);
g_dbus_method_invocation_take_error (invocation, new_error);
- return FALSE;
+ return TRUE;
}
cookie = _generate_unique_cookie (manager);
--
GitLab