X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-session-dbus.c;h=f9305ddbee63c04147b98711e97eb6157d04ab7b;hb=952d1536f4d7b64cfe938a569402434decffe4cd;hp=f1905e93f36ba938f07f06f1729f675342827119;hpb=556089dc57b10a12a03edd3d3e90ca17398ad206;p=elogind.git diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index f1905e93f..f9305ddbe 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c @@ -188,7 +188,7 @@ static int method_terminate(sd_bus *bus, sd_bus_message *message, void *userdata assert(message); assert(s); - r = session_stop(s); + r = session_stop(s, true); if (r < 0) return r; @@ -444,6 +444,7 @@ const sd_bus_vtable session_vtable[] = { SD_BUS_PROPERTY("RemoteHost", "s", NULL, offsetof(Session, remote_host), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("RemoteUser", "s", NULL, offsetof(Session, remote_user), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Service", "s", NULL, offsetof(Session, service), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("Desktop", "s", NULL, offsetof(Session, desktop), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Scope", "s", NULL, offsetof(Session, scope), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Leader", "u", bus_property_get_pid, offsetof(Session, leader), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Audit", "u", NULL, offsetof(Session, audit_id), SD_BUS_VTABLE_PROPERTY_CONST), @@ -647,13 +648,16 @@ int session_send_create_reply(Session *s, sd_bus_error *error) { assert(s); - /* This is called after the session scope was successfully - * created, and finishes where bus_manager_create_session() - * left off. */ + /* This is called after the session scope and the user service + * were successfully created, and finishes where + * bus_manager_create_session() left off. */ if (!s->create_message) return 0; + if (!sd_bus_error_is_set(error) && (s->scope_job || s->user->service_job)) + return 0; + c = s->create_message; s->create_message = NULL;