summaryrefslogtreecommitdiff
path: root/src/login/logind-session-dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-10-28 17:25:23 +0100
committerLennart Poettering <lennart@poettering.net>2012-10-30 03:40:42 +0100
commit7ba643863116cd0b5abf048e53321f93e5743f69 (patch)
tree1728536e8916d522cb4378b3777b034e74c2a116 /src/login/logind-session-dbus.c
parentfaf22b6559a747ca6b2185b816d60cce376b11c8 (diff)
logind: unify all session lock loop
Diffstat (limited to 'src/login/logind-session-dbus.c')
-rw-r--r--src/login/logind-session-dbus.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index 26c853e4ee..ef73cd434a 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -570,3 +570,21 @@ int session_send_lock(Session *s, bool lock) {
return 0;
}
+
+int session_send_lock_all(Manager *m, bool lock) {
+ Session *session;
+ Iterator i;
+ int r = 0;
+
+ assert(m);
+
+ HASHMAP_FOREACH(session, m->sessions, i) {
+ int k;
+
+ k = session_send_lock(session, lock);
+ if (k < 0)
+ r = k;
+ }
+
+ return r;
+}