summaryrefslogtreecommitdiff
path: root/xfce4-session-logout
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2016-05-20 20:25:40 +0300
committerEric Koegel <eric.koegel@gmail.com>2016-05-21 08:19:11 +0300
commit769c1d1e92f06772499faaf9196163e9d9cb0c1f (patch)
treead2902fe0bf421bd0b538330a64f06f426fe0026 /xfce4-session-logout
parente6aafcf444e529648e4542292c29084b3a9e66e5 (diff)
downloadxfce4-session-769c1d1e92f06772499faaf9196163e9d9cb0c1f.tar.gz
Fix shutdown and reboot gdbus calls
Diffstat (limited to 'xfce4-session-logout')
-rw-r--r--xfce4-session-logout/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xfce4-session-logout/main.c b/xfce4-session-logout/main.c
index 702b51ee..2ed8a9e4 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