chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prep v234: Re-add user/session to the gc_queue when stopping.
[elogind.git]
/
src
/
login
/
logind-inhibit.c
diff --git
a/src/login/logind-inhibit.c
b/src/login/logind-inhibit.c
index a7e5c01ef38a16769c5a1584a37a06cfb61c185c..1e6f3837382fe163fed58bbeda901abdda364d91 100644
(file)
--- a/
src/login/logind-inhibit.c
+++ b/
src/login/logind-inhibit.c
@@
-26,7
+26,7
@@
#include "escape.h"
#include "fd-util.h"
#include "fileio.h"
#include "escape.h"
#include "fd-util.h"
#include "fileio.h"
-#include "format
s
-util.h"
+#include "format-util.h"
#include "logind-inhibit.h"
#include "mkdir.h"
#include "parse-util.h"
#include "logind-inhibit.h"
#include "mkdir.h"
#include "parse-util.h"
@@
-347,7
+347,7
@@
InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm) {
assert(m);
HASHMAP_FOREACH(i, m->inhibitors, j)
assert(m);
HASHMAP_FOREACH(i, m->inhibitors, j)
- if (i->mode == mm)
+ if (i->mode == mm
&& i->started
)
what |= i->what;
return what;
what |= i->what;
return what;
@@
-388,6
+388,9
@@
bool manager_is_inhibited(
assert(w > 0 && w < _INHIBIT_WHAT_MAX);
HASHMAP_FOREACH(i, m->inhibitors, j) {
assert(w > 0 && w < _INHIBIT_WHAT_MAX);
HASHMAP_FOREACH(i, m->inhibitors, j) {
+ if (!i->started)
+ continue;
+
if (!(i->what & w))
continue;
if (!(i->what & w))
continue;