chiark / gitweb /
logind: Ensure the user, seat and session files are updated when the session is closing.
authorColin Guthrie <colin@mageia.org>
Tue, 4 Sep 2012 00:37:27 +0000 (01:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 12 Sep 2012 06:19:59 +0000 (08:19 +0200)
src/login/logind-session.c

index 77462a8..9740e23 100644 (file)
@@ -714,9 +714,11 @@ int session_stop(Session *s) {
                         seat_set_active(s->seat, NULL);
 
                 seat_send_changed(s->seat, "Sessions\0");
+                seat_save(s->seat);
         }
 
         user_send_changed(s->user, "Sessions\0");
+        user_save(s->user);
 
         s->started = false;
 
@@ -870,6 +872,9 @@ void session_remove_fifo(Session *s) {
                 assert_se(epoll_ctl(s->manager->epoll_fd, EPOLL_CTL_DEL, s->fifo_fd, NULL) == 0);
                 close_nointr_nofail(s->fifo_fd);
                 s->fifo_fd = -1;
+
+                session_save(s);
+                user_save(s->user);
         }
 
         if (s->fifo_path) {