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



commit 1df5d5bdebd2133b921910bdda0be6799249a605
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 86ceff8..158a5f1 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -2324,13 +2324,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]