[gdm/multi-stack: 17/31] Force session reset if all PAM conversations fail
- From: Ray Strode <halfline src gnome org>
- To: svn-commits-list gnome org
- Subject: [gdm/multi-stack: 17/31] Force session reset if all PAM conversations fail
- Date: Fri, 17 Apr 2009 10:27:00 -0400 (EDT)
commit ff3ec0b56e8343b86eec5edf9399ff12826cf861
Author: Ray Strode <rstrode redhat com>
Date: Sat Feb 7 21:17:49 2009 -0500
Force session reset if all PAM conversations fail
---
gui/simple-greeter/gdm-greeter-login-window.c | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 2e9a1a0..92a4c85 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -810,15 +810,21 @@ reset_dialog (GdmGreeterLoginWindow *login_window)
}
static void
-do_cancel (GdmGreeterLoginWindow *login_window)
+restart_conversations (GdmGreeterLoginWindow *login_window)
{
- /* need to wait for response from backend */
- set_message (login_window, _("Cancelling..."));
set_busy (login_window);
set_sensitive (login_window, FALSE);
g_signal_emit (login_window, signals[CANCELLED], 0);
}
+static void
+do_cancel (GdmGreeterLoginWindow *login_window)
+{
+ /* need to wait for response from backend */
+ set_message (login_window, _("Cancelling..."));
+ restart_conversations (login_window);
+}
+
gboolean
gdm_greeter_login_window_ready (GdmGreeterLoginWindow *login_window,
const char *service_name)
@@ -864,6 +870,16 @@ gdm_greeter_login_window_conversation_stopped (GdmGreeterLoginWindow *login_wind
g_object_unref (task);
}
+ /* If every conversation has failed, then just start over.
+ */
+ task = gdm_task_list_get_active_task (GDM_TASK_LIST (login_window->priv->conversation_list));
+
+ if (!gdm_task_is_enabled (task)) {
+ g_debug ("GdmGreeterLoginWindow: No conversations left, starting over");
+ restart_conversations (login_window);
+ }
+ g_object_unref (task);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]