chiark / gitweb /
Reset pending actions after returning from possible suspend/sleep actions.
authorSven Eden <yamakuzure@gmx.net>
Wed, 17 May 2017 05:56:39 +0000 (07:56 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 17 May 2017 06:00:45 +0000 (08:00 +0200)
This should fix any "suspension loops".

src/login/logind-dbus.c

index 209e62b676ad65f85b7e6b7f523f14785fb66780..82ab09be1090b15f6581da6dc51a784be5670d4f 100644 (file)
@@ -1532,6 +1532,10 @@ static int execute_shutdown_or_sleep(
                         "ss", NULL, "replace-irreversibly");
 #else
         r = shutdown_or_sleep(m, action);
+
+        /* no more pending actions, whether this failed or not */
+        m->pending_action = HANDLE_IGNORE;
+        m->action_what    = 0;
 #endif // 0
         if (r < 0)
                 return r;