chiark / gitweb /
Fix assertion failure when resuming from sleep/suspend
authorSven Eden <yamakuzure@gmx.net>
Tue, 4 Apr 2017 06:51:33 +0000 (08:51 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 4 Apr 2017 06:51:33 +0000 (08:51 +0200)
src/login/logind-action.h
src/login/logind-dbus.c

index 99b06bf..6b63b92 100644 (file)
@@ -22,7 +22,7 @@
 ***/
 
 typedef enum HandleAction {
-        HANDLE_IGNORE,
+        HANDLE_IGNORE = 0,
         HANDLE_POWEROFF,
         HANDLE_REBOOT,
         HANDLE_HALT,
index d238d6c..0c1f90d 100644 (file)
@@ -1528,7 +1528,7 @@ int manager_dispatch_delayed(Manager *manager, bool timeout) {
 
         assert(manager);
 
-        if (manager->action_what == 0 && manager->pending_action == 0)
+        if ( (0 == manager->action_what) || (HANDLE_IGNORE == manager->pending_action) )
                 return 0;
 
         if (manager_is_inhibited(manager, manager->action_what, INHIBIT_DELAY, NULL, false, false, 0, &offending)) {