chiark / gitweb /
logind: make sure we hand out write fd, and keep read fd for session end detection
[elogind.git] / src / logind-seat-dbus.c
index 1895fe6cc36c2e4531a6846d014ec46e2654092b..ad0298e7a7f661efeac64ffdca5d160fdf4dc7c7 100644 (file)
@@ -151,13 +151,13 @@ static int bus_seat_append_can_activate(DBusMessageIter *i, const char *property
 
 static int bus_seat_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
         Seat *s = data;
-        bool b;
+        dbus_bool_t b;
 
         assert(i);
         assert(property);
         assert(s);
 
-        b = seat_get_idle_hint(s, NULL);
+        b = seat_get_idle_hint(s, NULL) > 0;
         if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
                 return -ENOMEM;
 
@@ -378,6 +378,9 @@ int seat_send_changed(Seat *s, const char *properties) {
 
         assert(s);
 
+        if (!s->started)
+                return 0;
+
         p = seat_bus_path(s);
         if (!p)
                 return -ENOMEM;