Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 578220ff64cb3ddf982acff53dff8b22 > files > 3

gnome-settings-daemon-3.14.2-2.mga5.src.rpm

From d91542cfa716923c4ef62b17ee2b3ae6ddedd8c5 Mon Sep 17 00:00:00 2001
From: Simon McVittie <simon.mcvittie@collabora.co.uk>
Date: Mon, 9 Mar 2015 09:48:16 +0000
Subject: [PATCH] power: make sure to set an error when GDBus set_property
 fails

If we return FALSE, the API is that the error must be set, and
GDBus asserts this.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=745920
Bug-Debian: https://bugs.debian.org/775877
Reviewed-by: Bastien Nocera
(cherry picked from commit 4e8448ac5c2b7bda014fea602f305d63ffeca1ea)
---
 plugins/power/gsd-power-manager.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index b31ec6d..eafa082 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2771,6 +2771,8 @@ handle_set_property (GDBusConnection *connection,
         /* Check session pointer as a proxy for whether the manager is in the
            start or stop state */
         if (manager->priv->session == NULL) {
+                g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
+                             "Manager is starting or stopping");
                 return FALSE;
         }
 
-- 
2.3.2