summaryrefslogtreecommitdiff
path: root/src/login/logind-user.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-user.c')
-rw-r--r--src/login/logind-user.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index a6672ce670..9dfead9d5d 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -180,6 +180,20 @@ int user_save(User *u) {
fputs(i->id, f);
}
+ fputs("\nONLINE_SESSIONS=", f);
+ first = true;
+ LIST_FOREACH(sessions_by_user, i, u->sessions) {
+ if (session_get_state(i) == SESSION_CLOSING)
+ continue;
+
+ if (first)
+ first = false;
+ else
+ fputc(' ', f);
+
+ fputs(i->id, f);
+ }
+
fputs("\nACTIVE_SEATS=", f);
first = true;
LIST_FOREACH(sessions_by_user, i, u->sessions) {
@@ -193,6 +207,20 @@ int user_save(User *u) {
fputs(i->seat->id, f);
}
+
+ fputs("\nONLINE_SEATS=", f);
+ first = true;
+ LIST_FOREACH(sessions_by_user, i, u->sessions) {
+ if (session_get_state(i) == SESSION_CLOSING || !i->seat)
+ continue;
+
+ if (first)
+ first = false;
+ else
+ fputc(' ', f);
+
+ fputs(i->seat->id, f);
+ }
fputc('\n', f);
}