[systemd-commits] 2 commits - TODO src/login
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Feb 11 11:32:54 PST 2014
TODO | 1 +
src/login/logind-user.c | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 2fcb3af6a2931cfc74c8602ab68f00bc99b61b1c
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Feb 11 20:31:37 2014 +0100
update TODO
diff --git a/TODO b/TODO
index 06c3590..fd2cfcb 100644
--- a/TODO
+++ b/TODO
@@ -144,6 +144,7 @@ Features:
- allow updating attach flags during runtime
- pid1: peek into activating message when activating a service
- test bloom filter generation indexes
+ - introduce sd_bus_emit_object_added()/sd_bus_emit_object_removed() that automatically includes the build-in interfaces in the list
* sd-event
- allow multiple signal handlers per signal?
commit 00555a2ee1b008bccbb570320047307b8b9159f9
Author: Djalal Harouni <tixxdz at opendz.org>
Date: Sat Feb 8 20:51:57 2014 +0100
logind: use session_get_state() to get sessions state of the user
In function user_get_state() remove the session_is_active() check, just
count on the session_get_state() function to get the correct session
state.
session_is_active() may return true before starting the session scope
and user service, this means it will return true even before the creation
of the session fifo_fd which will produce incorrect states.
So be consistent and just use session_get_state().
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index fdbf6e3..06fdbb3 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -648,9 +648,12 @@ UserState user_get_state(User *u) {
bool all_closing = true;
LIST_FOREACH(sessions_by_user, i, u->sessions) {
- if (session_is_active(i))
+ SessionState state;
+
+ state = session_get_state(i);
+ if (state == SESSION_ACTIVE)
return USER_ACTIVE;
- if (session_get_state(i) != SESSION_CLOSING)
+ if (state != SESSION_CLOSING)
all_closing = false;
}
More information about the systemd-commits
mailing list