diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-06-21 21:46:13 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-21 21:46:13 +0200 |
commit | 9418f14772e7e646fe981d45506b3bbce68d6ccf (patch) | |
tree | 5488c3550abe14fd8603db723e45423fd0173b2e /src/logind-user.c | |
parent | da11939561b1e6eeb1131b68dbf43042fd633a05 (diff) |
logind: send out PropertyChanged signals where appropriate
Diffstat (limited to 'src/logind-user.c')
-rw-r--r-- | src/logind-user.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/logind-user.c b/src/logind-user.c index 70d6a9a524..cb3e44197f 100644 --- a/src/logind-user.c +++ b/src/logind-user.c @@ -260,6 +260,9 @@ int user_start(User *u) { assert(u); + if (u->started) + return 0; + /* Make XDG_RUNTIME_DIR */ r = user_mkdir_runtime_path(u); if (r < 0) @@ -280,6 +283,8 @@ int user_start(User *u) { dual_timestamp_get(&u->timestamp); + u->started = true; + user_send_signal(u, true); return 0; @@ -361,6 +366,9 @@ int user_stop(User *u) { int r = 0, k; assert(u); + if (!u->started) + return 0; + LIST_FOREACH(sessions_by_user, s, u->sessions) { k = session_stop(s); if (k < 0) @@ -387,6 +395,8 @@ int user_stop(User *u) { unlink(u->state_file); user_add_to_gc_queue(u); + u->started = false; + return r; } |