1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00

logind: Stopped inhibitions should be considered inactive (#5698)

This commit is contained in:
afrantzis 2017-04-05 11:32:55 +03:00 committed by Martin Pitt
parent 91dacd4451
commit 5e8273acac

View File

@ -347,7 +347,7 @@ InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm) {
assert(m);
HASHMAP_FOREACH(i, m->inhibitors, j)
if (i->mode == mm)
if (i->mode == mm && i->started)
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) {
if (!i->started)
continue;
if (!(i->what & w))
continue;