summaryrefslogtreecommitdiff
path: root/src/login/logind.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-05-08 19:02:25 +0200
committerLennart Poettering <lennart@poettering.net>2012-05-08 19:02:25 +0200
commitd889a2069a87e4617b32ddbdeace5a53a12c699d (patch)
tree7b83f31c7e3f02fda73d4e208598bd93713f9685 /src/login/logind.c
parent6edd7d0a09171ea5ae8e01b7b1cbcb0bdfbfeb16 (diff)
logind: implement suspend/hibernate calls with inhibition logic
Diffstat (limited to 'src/login/logind.c')
-rw-r--r--src/login/logind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index 5860bfc8d7..8d4f7333c9 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -1269,7 +1269,7 @@ int manager_run(Manager *m) {
manager_gc(m, true);
- if (manager_dispatch_delayed_shutdown(m) > 0)
+ if (manager_dispatch_delayed(m) > 0)
continue;
if (dbus_connection_dispatch(m->bus) != DBUS_DISPATCH_COMPLETE)
@@ -1277,11 +1277,11 @@ int manager_run(Manager *m) {
manager_gc(m, true);
- if (m->delayed_shutdown) {
+ if (m->delayed_unit) {
usec_t x, y;
x = now(CLOCK_MONOTONIC);
- y = m->delayed_shutdown_timestamp + m->inhibit_delay_max;
+ y = m->delayed_timestamp + m->inhibit_delay_max;
msec = x >= y ? 0 : (int) ((y - x) / USEC_PER_MSEC);
}