[gdm/multi-stack: 29/49] When one PAM conv. wins, actually stop the others



commit 6a2b392cd5b36c13035ffdb70701057b15c92a70
Author: Ray Strode <rstrode redhat com>
Date:   Tue Apr 21 15:30:28 2009 -0400

    When one PAM conv. wins, actually stop the others
    
    We weren't properly keeping the winning conversation
    around in the previous commit

 daemon/gdm-session-direct.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
index 52a67c4..7cc5511 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -2282,13 +2282,20 @@ stop_all_other_conversations (GdmSessionDirect        *session,
                 conversation = (GdmSessionConversation *) value;
 
                 if (conversation == conversation_to_keep) {
-                        continue;
+                        g_hash_table_iter_steal (&iter);
+                        g_free (key);
+                } else {
+                        stop_conversation (conversation);
                 }
-
-                stop_conversation (conversation);
         }
 
         g_hash_table_remove_all (session->priv->conversations);
+
+        if (conversation_to_keep != NULL) {
+                g_hash_table_insert (session->priv->conversations,
+                                     g_strdup (conversation_to_keep->service_name),
+                                     conversation_to_keep);
+        }
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]