chiark / gitweb /
Clear pending action after resume from delayed sleep.
authorAndy Wingo <wingo@pobox.com>
Thu, 17 Mar 2016 08:21:53 +0000 (09:21 +0100)
committerAndy Wingo <wingo@pobox.com>
Thu, 17 Mar 2016 08:22:03 +0000 (09:22 +0100)
src/login/logind-dbus.c

index 210e7548090992a3e2523a8457673102734fb7de..5162cdf875f0f0b8e4d0c6f9f2dddedfb537f0c5 100644 (file)
@@ -1456,8 +1456,11 @@ static int execute_shutdown_or_sleep(
         if (r < 0)
                 return r;
 
-        /* And we're back. */
-        send_prepare_for(m, w, false);
+        if (w == INHIBIT_SLEEP)
+                /* And we're back. */
+                send_prepare_for(m, w, false);
+
+        m->action_what = 0;
 
         /* Make sure the lid switch is ignored for a while (?) */
         manager_set_lid_switch_ignore(m, now(CLOCK_MONOTONIC) + m->holdoff_timeout_usec);