chiark / gitweb /
logind: remove unused session->closing field
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 28 Nov 2013 16:29:01 +0000 (17:29 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 28 Nov 2013 16:41:44 +0000 (17:41 +0100)
This field is always false, drop it. If you want a reliable way to get
session state, call session_get_state(). Testing for any flags directly
doesn't work currently so don't pretend it would.

src/login/logind-dbus.c
src/login/logind-session.c
src/login/logind-session.h

index 9538150e2e548c6051a75357c5d5e95f3056d64e..a4bdf5f28cf9cc8e19e69c471f32c2c4984a48c1 100644 (file)
@@ -1252,7 +1252,6 @@ static int have_multiple_sessions(
          * count, and non-login sessions do not count either. */
         HASHMAP_FOREACH(session, m->sessions, i)
                 if (session->class == SESSION_USER &&
          * count, and non-login sessions do not count either. */
         HASHMAP_FOREACH(session, m->sessions, i)
                 if (session->class == SESSION_USER &&
-                    !session->closing &&
                     session->user->uid != uid)
                         return true;
 
                     session->user->uid != uid)
                         return true;
 
index a72b13ee0363c3826836706c36c4f4dd64439c00..beaa60124f7c6b86300f1daa01e2cd2ccd830b0a 100644 (file)
@@ -954,9 +954,6 @@ void session_add_to_gc_queue(Session *s) {
 SessionState session_get_state(Session *s) {
         assert(s);
 
 SessionState session_get_state(Session *s) {
         assert(s);
 
-        if (s->closing)
-                return SESSION_CLOSING;
-
         if (s->scope_job)
                 return SESSION_OPENING;
 
         if (s->scope_job)
                 return SESSION_OPENING;
 
index 939476af557d8ac7c732067458164d11f4fcad30..ee931013dd9cbdc01e76779bbe0508c3da8a56d8 100644 (file)
@@ -107,7 +107,6 @@ struct Session {
 
         bool in_gc_queue:1;
         bool started:1;
 
         bool in_gc_queue:1;
         bool started:1;
-        bool closing:1;
 
         sd_bus_message *create_message;
 
 
         sd_bus_message *create_message;