[PATCH 04/20] [main] fix bug with multiple quit commands

Scott James Remnant scott at ubuntu.com
Thu Mar 18 13:29:05 PDT 2010


Likewise if plymouth quit is called when we're waiting for the boot
splash to become idle, we also end up asserting that there's not
already an idle trigger.

Fix it in the same way as deactive, ignore the second quit command
except for pulling its trigger.
---
 src/main.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/main.c b/src/main.c
index bb8ab4f..f914a37 100644
--- a/src/main.c
+++ b/src/main.c
@@ -786,15 +786,20 @@ on_quit (state_t       *state,
          bool           retain_splash,
          ply_trigger_t *quit_trigger)
 {
+  if (state->quit_trigger != NULL)
+    {
+      ply_trigger_pull (quit_trigger, NULL);
+      return;
+    }
+
+  state->quit_trigger = quit_trigger;
+  state->should_retain_splash = retain_splash;
+
   ply_trace ("time to quit, closing log");
   if (state->session != NULL)
     ply_terminal_session_close_log (state->session);
   ply_trace ("unloading splash");
 
-  state->should_retain_splash = retain_splash;
-
-  state->quit_trigger = quit_trigger;
-
   if (state->boot_splash != NULL)
     {
       ply_boot_splash_become_idle (state->boot_splash,
-- 
1.7.0



More information about the plymouth mailing list