]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[main] fix bug with multiple quit commands
authorScott James Remnant <scott@ubuntu.com>
Thu, 18 Mar 2010 20:29:05 +0000 (20:29 +0000)
committerRay Strode <rstrode@redhat.com>
Mon, 22 Mar 2010 03:06:36 +0000 (23:06 -0400)
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

index bb8ab4f480a6497745146aa1ced178fa49095651..f914a371aac55f6295c2d88c8801b4fbfdb590c9 100644 (file)
@@ -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,