[gdm/gnome-2-30] Fix bug #621581 so that PostSession is called when GDM shuts down or when the main GDM daemon is kil



commit 756825d337c5a0402074590016033415266d1255
Author: Brian Cameron <brian cameron oracle com>
Date:   Thu Apr 7 12:19:39 2011 -0500

    Fix bug #621581 so that PostSession is called when GDM shuts down or
    when the main GDM daemon is killed.

 daemon/gdm-simple-slave.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index fb14223..fa8d4b6 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -128,17 +128,7 @@ on_session_exited (GdmSession     *session,
                    int             exit_code,
                    GdmSimpleSlave *slave)
 {
-        char *username;
-
         g_debug ("GdmSimpleSlave: session exited with code %d\n", exit_code);
-
-        /* Run the PostSession script. gdmslave suspends until script has terminated */
-        username = gdm_session_direct_get_username (slave->priv->session);
-        if (username != NULL) {
-                gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostSession", username);
-        }
-        g_free (username);
-
         gdm_slave_stopped (GDM_SLAVE (slave));
 }
 
@@ -1202,6 +1192,17 @@ gdm_simple_slave_stop (GdmSlave *slave)
         }
 
         if (GDM_SIMPLE_SLAVE (slave)->priv->session != NULL) {
+                char *username;
+
+                /* Run the PostSession script. gdmslave suspends until script
+                 * has terminated
+                 */
+                username = gdm_session_direct_get_username (GDM_SIMPLE_SLAVE (slave)->priv->session);
+                if (username != NULL) {
+                        gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostSession", username);
+                }
+                g_free (username);
+
                 gdm_session_close (GDM_SESSION (GDM_SIMPLE_SLAVE (slave)->priv->session));
                 g_object_unref (GDM_SIMPLE_SLAVE (slave)->priv->session);
                 GDM_SIMPLE_SLAVE (slave)->priv->session = NULL;



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