X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogind-session-dbus.c;h=2435a6512b79f3a422931cd9d92711189c09f517;hb=193197e85ccc5622abd9653dcd939712334d3ea3;hp=0ce880c590b80f9323a404d33fa753af762b04b7;hpb=9418f14772e7e646fe981d45506b3bbce68d6ccf;p=elogind.git diff --git a/src/logind-session-dbus.c b/src/logind-session-dbus.c index 0ce880c59..2435a6512 100644 --- a/src/logind-session-dbus.c +++ b/src/logind-session-dbus.c @@ -49,6 +49,7 @@ " \n" \ " \n" \ " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ @@ -144,7 +145,7 @@ static int bus_session_append_user(DBusMessageIter *i, const char *property, voi static int bus_session_append_active(DBusMessageIter *i, const char *property, void *data) { Session *s = data; - bool b; + dbus_bool_t b; assert(i); assert(property); @@ -159,13 +160,13 @@ static int bus_session_append_active(DBusMessageIter *i, const char *property, v static int bus_session_append_idle_hint(DBusMessageIter *i, const char *property, void *data) { Session *s = data; - bool b; + int b; assert(i); assert(property); assert(s); - b = session_get_idle_hint(s, NULL); + b = session_get_idle_hint(s, NULL) > 0; if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b)) return -ENOMEM; @@ -236,6 +237,7 @@ static DBusHandlerResult session_message_dispatch( { "org.freedesktop.login1.Session", "Remote", bus_property_append_bool, "b", &s->remote }, { "org.freedesktop.login1.Session", "RemoteUser", bus_property_append_string, "s", s->remote_user }, { "org.freedesktop.login1.Session", "RemoteHost", bus_property_append_string, "s", s->remote_host }, + { "org.freedesktop.login1.Session", "Service", bus_property_append_string, "s", s->service }, { "org.freedesktop.login1.Session", "Leader", bus_property_append_pid, "u", &s->leader }, { "org.freedesktop.login1.Session", "Audit", bus_property_append_uint32, "u", &s->audit_id }, { "org.freedesktop.login1.Session", "Type", bus_session_append_type, "s", &s->type }, @@ -427,6 +429,9 @@ int session_send_changed(Session *s, const char *properties) { assert(s); + if (!s->started) + return 0; + p = session_bus_path(s); if (!p) return -ENOMEM;