[gdm] GdmSession: remove session from the hash table before emitting signals



commit cb5776465a9286652bb3ff939046052adf01b1e0
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Sep 18 22:42:12 2012 +0200

    GdmSession: remove session from the hash table before emitting signals
    
    GdmSession::session-died and GdmSession::session-exited cause the simple
    slave to stop, closing thus also the session, which would then walk all
    conversations and free them. But the conversation is already freed at
    the end of the worker-exited / worker-died handlers.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684326

 daemon/gdm-session.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index ce16972..abb4104 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -1699,14 +1699,14 @@ worker_exited (GdmSessionWorkerJob    *job,
 
         g_debug ("GdmSession: Worker job exited: %d", code);
 
+        g_hash_table_steal (self->priv->conversations, conversation->service_name);
+
         g_object_ref (conversation->job);
         if (self->priv->session_conversation == conversation) {
                 g_signal_emit (self, signals[SESSION_EXITED], 0, code);
                 self->priv->session_conversation = NULL;
         }
 
-        g_hash_table_steal (self->priv->conversations, conversation->service_name);
-
         g_debug ("GdmSession: Emitting conversation-stopped signal");
         g_signal_emit (self, signals[CONVERSATION_STOPPED], 0, conversation->service_name);
         if (self->priv->user_verifier_interface != NULL) {
@@ -1732,14 +1732,14 @@ worker_died (GdmSessionWorkerJob    *job,
 
         g_debug ("GdmSession: Worker job died: %d", signum);
 
+        g_hash_table_steal (self->priv->conversations, conversation->service_name);
+
         g_object_ref (conversation->job);
         if (self->priv->session_conversation == conversation) {
                 g_signal_emit (self, signals[SESSION_DIED], 0, signum);
                 self->priv->session_conversation = NULL;
         }
 
-        g_hash_table_steal (self->priv->conversations, conversation->service_name);
-
         g_debug ("GdmSession: Emitting conversation-stopped signal");
         g_signal_emit (self, signals[CONVERSATION_STOPPED], 0, conversation->service_name);
         if (self->priv->user_verifier_interface != NULL) {



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