summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-10-15 08:48:17 +0200
committerSven Eden <yamakuzure@gmx.net>2018-10-15 18:01:59 +0200
commite143b8013b96fca5d5ef4a73fe255daed3aa1ec3 (patch)
treebd01664598a4fd03e8abaa82c422bbe6a5565ff3
parent863559071356459e9374a91e51c14e27c0a9b156 (diff)
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 <sven.eden@prydeworx.com>
-rw-r--r--src/login/logind-session.c2
-rw-r--r--src/login/logind.c4
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");