else {
seat = hashmap_get(m->seats, cseat);
if (!seat)
- return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_SEAT, "No seat '%s' known", seat);
+ return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_SEAT, "No seat '%s' known", cseat);
}
if (tty_is_vc(tty)) {
if (!seat)
seat = m->seat0;
else if (seat != m->seat0)
- return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "TTY %s is virtual console but seat %s is not seat0", tty, seat);
+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "TTY %s is virtual console but seat %s is not seat0", tty, seat->id);
v = vtnr_from_tty(tty);
if (v <= 0)
user->slice_job = NULL;
}
+ LIST_FOREACH(sessions_by_user, session, user->sessions) {
+ if (!session->started)
+ continue;
+
+ if (streq(result, "done"))
+ session_send_create_reply(session, NULL);
+ else {
+ _cleanup_bus_error_free_ sd_bus_error e = SD_BUS_ERROR_NULL;
+
+ sd_bus_error_setf(&e, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result);
+ session_send_create_reply(session, &e);
+ }
+ }
+
user_save(user);
user_add_to_gc_queue(user);
}