mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
logind: Stopped inhibitions should be considered inactive (#5698)
This commit is contained in:
parent
91dacd4451
commit
5e8273acac
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user