summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-08-07 10:40:50 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-10-29 10:18:36 +0100
commit9af0f5ff67079c4ae90ad7084ef003307a69d10e (patch)
treedfc3f2210c389b8af2ff70e031be54548b57bf5c /src
parent33d697322be8bf957ec4e1caebcf5a7c2028015f (diff)
logind: minor session time handling tweaks
(cherry picked from commit 061c6607a9f2e39a76ee74048f19b5de16c8fac3)
Diffstat (limited to 'src')
-rw-r--r--src/login/logind-session.c2
-rw-r--r--src/login/logind-session.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 2c4539398..16d69defa 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -870,7 +870,7 @@ int session_release(Session *s) {
return sd_event_add_time(s->manager->event,
&s->timer_event_source,
CLOCK_MONOTONIC,
- now(CLOCK_MONOTONIC) + RELEASE_USEC, 0,
+ usec_add(now(CLOCK_MONOTONIC), RELEASE_USEC), 0,
release_timeout_callback, s);
}
diff --git a/src/login/logind-session.h b/src/login/logind-session.h
index e4ed264ca..2a082c111 100644
--- a/src/login/logind-session.h
+++ b/src/login/logind-session.h
@@ -99,6 +99,7 @@ struct Session {
sd_bus_message *create_message;
+ /* Set up when a client requested to release the session via the bus */
sd_event_source *timer_event_source;
char *controller;