[gnome-session/gnome-2-26] [gsm] Make gnome-session exit properly on reboot/shutdown
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-session/gnome-2-26] [gsm] Make gnome-session exit properly on reboot/shutdown
- Date: Mon, 29 Jun 2009 22:39:29 +0000 (UTC)
commit d95d946c1a087e410bbcf25cacd9d6ab4349f989
Author: Bill Nottingham <notting redhat com>
Date: Tue Jun 30 00:21:01 2009 +0200
[gsm] Make gnome-session exit properly on reboot/shutdown
GsmConsoleKit wasn't correctly emitting signals on success, and
therefore the manager couldn't exit properly.
http://bugzilla.gnome.org/show_bug.cgi?id=581043
gnome-session/gsm-consolekit.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gnome-session/gsm-consolekit.c b/gnome-session/gsm-consolekit.c
index 5fc1b7c..5541006 100644
--- a/gnome-session/gsm-consolekit.c
+++ b/gnome-session/gsm-consolekit.c
@@ -439,8 +439,8 @@ system_restart_auth_cb (PolKitAction *action,
g_warning ("Unable to restart system: %s", local_error->message);
emit_restart_complete (manager, local_error->message);
g_error_free (local_error);
-
- return;
+ } else {
+ emit_restart_complete (manager, NULL);
}
}
@@ -469,8 +469,8 @@ system_stop_auth_cb (PolKitAction *action,
g_warning ("Unable to stop system: %s", local_error->message);
emit_stop_complete (manager, local_error);
g_error_free (local_error);
-
- return;
+ } else {
+ emit_stop_complete (manager, NULL);
}
}
@@ -606,10 +606,13 @@ gsm_consolekit_attempt_restart (GsmConsolekit *manager)
if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) {
request_restart_priv (manager, error);
} else {
+ g_warning ("Unable to restart system: %s", error->message);
emit_restart_complete (manager, error->message);
}
g_error_free (error);
+ } else {
+ emit_restart_complete (manager, NULL);
}
}
@@ -631,14 +634,16 @@ gsm_consolekit_attempt_stop (GsmConsolekit *manager)
res = try_system_stop (manager->priv->dbus_connection, &error);
if (!res) {
- g_warning ("Unable to stop system: %s", error->message);
if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) {
request_stop_priv (manager, error);
} else {
+ g_warning ("Unable to stop system: %s", error->message);
emit_stop_complete (manager, error);
}
g_error_free (error);
+ } else {
+ emit_stop_complete (manager, NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]