[Xfce4-commits] [xfce/xfce4-session] 01/02: Fix shutdown and reboot gdbus calls

noreply at xfce.org noreply at xfce.org
Sat May 21 07:19:26 CEST 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-session.

commit 769c1d1e92f06772499faaf9196163e9d9cb0c1f
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri May 20 20:25:40 2016 +0300

    Fix shutdown and reboot gdbus calls
---
 xfce4-session-logout/main.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/xfce4-session-logout/main.c b/xfce4-session-logout/main.c
index 702b51e..2ed8a9e 100644
--- a/xfce4-session-logout/main.c
+++ b/xfce4-session-logout/main.c
@@ -161,7 +161,7 @@ main (int argc, char **argv)
   if (opt_halt)
     {
       result = g_dbus_proxy_call_sync (proxy, "Shutdown",
-                                       g_variant_new_boolean(allow_save),
+                                       g_variant_new ("(b)", allow_save),
                                        G_DBUS_CALL_FLAGS_NONE,
                                        -1,
                                        NULL,
@@ -170,7 +170,7 @@ main (int argc, char **argv)
   else if (opt_reboot)
     {
       result = g_dbus_proxy_call_sync (proxy, "Restart",
-                                       g_variant_new_boolean(allow_save),
+                                       g_variant_new ("(b)", allow_save),
                                        G_DBUS_CALL_FLAGS_NONE,
                                        -1,
                                        NULL,
@@ -209,6 +209,10 @@ main (int argc, char **argv)
    * they upgraded their system, see bug #8630 */
   if (!result)
     {
+      if (err != NULL)
+        {
+          g_print (_("Received error while trying to log out, error was %s"), err->message);
+        }
       g_clear_error (&err);
 
       if (opt_logout)
@@ -239,7 +243,7 @@ main (int argc, char **argv)
   if (!result)
     {
       xfce_session_logout_notify_error (_("Received error while trying to log out"), err, have_display);
-      g_error_free (err);
+      g_clear_error (&err);
       return EXIT_FAILURE;
     }
   else

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list