[gnome-session] manager: when system prepared, start next phase, don't re-end current phase



commit 962df1a1a0a582c4ab6caa6d84d218ac548fafca
Author: Ray Strode <rstrode redhat com>
Date:   Wed Dec 5 10:50:40 2012 -0500

    manager: when system prepared, start next phase, don't re-end current phase
    
    We currently end_phase the QUERY_END_SESSION phase multiple times.
    
    The apparent intent of the code is to start the END_SESSION phase,
    not re-end the QUERY_END_SESSSION phase so this commit fixes that.
    
    The bug manifests as an infinite loop.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689721

 gnome-session/gsm-manager.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 26392e7..c8e91b3 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -4095,7 +4095,9 @@ on_shutdown_prepared (GsmSystem  *system,
 
         if (success) {
                 /* move to end-session phase */
-                end_phase (manager);
+                g_assert (manager->priv->phase == GSM_MANAGER_PHASE_QUERY_END_SESSION);
+                manager->priv->phase++;
+                start_phase (manager);
         } else {
                 disconnect_shell_dialog_signals (manager);
                 gsm_shell_close_end_session_dialog (manager->priv->shell);



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