From e143b8013b96fca5d5ef4a73fe255daed3aa1ec3 Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Mon, 15 Oct 2018 08:48:17 +0200 Subject: 238/239 : Fix session finalization While migrating the v237/v238 commits, a migration error caused session_may_gc() to always return false. This caused closed sessions to stay on state "closing" forever. Bug: https://github.com/elogind/elogind/issues/82 Closes: https://github.com/elogind/elogind/issues/82 Signed-off-by: Sven Eden --- src/login/logind-session.c | 2 +- src/login/logind.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/login/logind-session.c b/src/login/logind-session.c index e0daa4440..fedf58358 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -1068,8 +1068,8 @@ bool session_may_gc(Session *s, bool drop_not_started) { return false; if (s->scope && manager_unit_is_active(s->manager, s->scope)) -#endif // 0 return false; +#endif // 0 return true; } diff --git a/src/login/logind.c b/src/login/logind.c index db26701dd..c7acb05cb 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -784,9 +784,9 @@ static int manager_connect_bus(Manager *m) { "Subscribe", NULL, NULL, NULL); -#endif // 0 if (r < 0) return log_error_errno(r, "Failed to enable subscription: %m"); +#endif // 0 r = sd_bus_request_name_async(m->bus, NULL, "org.freedesktop.login1", 0, NULL, NULL); if (r < 0) @@ -969,8 +969,8 @@ static int manager_connect_udev(Manager *m) { return r; } - /* Don't bother watching VCSA devices, if nobody cares */ #if 0 /// elogind does not support autospawning of vts + /* Don't bother watching VCSA devices, if nobody cares */ if (m->n_autovts > 0 && m->console_active_fd >= 0) { m->udev_vcsa_monitor = udev_monitor_new_from_netlink(m->udev, "udev"); -- cgit v1.2.3