X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-session.c;h=33ab09ea523c0d0ded9723b2293ccfe169e486ff;hb=f39d4a08e746e703d562076a0f622eb91dbdcd3e;hp=dc1d81c4be94271bc1451815709634fd87cb3628;hpb=39883f622f392d8579f4428fc5a789a102efbb10;p=elogind.git diff --git a/src/login/logind-session.c b/src/login/logind-session.c index dc1d81c4b..33ab09ea5 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -490,7 +490,7 @@ static int session_start_scope(Session *s) { if (!scope) return log_oom(); - r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-session.service", &error, &job); + r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-sessions.service", &error, &job); if (r < 0) { log_error("Failed to start session scope %s: %s %s", scope, bus_error_message(&error, r), error.name); @@ -683,7 +683,7 @@ void session_release(Session *s) { return; if (!s->timer_event_source) - sd_event_add_monotonic(s->manager->event, now(CLOCK_MONOTONIC) + RELEASE_USEC, 0, release_timeout_callback, s, &s->timer_event_source); + sd_event_add_monotonic(s->manager->event, &s->timer_event_source, now(CLOCK_MONOTONIC) + RELEASE_USEC, 0, release_timeout_callback, s); } bool session_is_active(Session *s) { @@ -844,7 +844,7 @@ int session_create_fifo(Session *s) { } if (!s->fifo_event_source) { - r = sd_event_add_io(s->manager->event, s->fifo_fd, 0, session_dispatch_fifo, s, &s->fifo_event_source); + r = sd_event_add_io(s->manager->event, &s->fifo_event_source, s->fifo_fd, 0, session_dispatch_fifo, s); if (r < 0) return r; @@ -986,7 +986,7 @@ void session_mute_vt(Session *s) { sigaddset(&mask, SIGUSR1); sigprocmask(SIG_BLOCK, &mask, NULL); - r = sd_event_add_signal(s->manager->event, SIGUSR1, session_vt_fn, s, &s->vt_source); + r = sd_event_add_signal(s->manager->event, &s->vt_source, SIGUSR1, session_vt_fn, s); if (r < 0) goto error; @@ -1008,7 +1008,7 @@ error: } void session_restore_vt(Session *s) { - _cleanup_free_ char *utf8; + _cleanup_free_ char *utf8 = NULL; int vt, kb = K_XLATE; struct vt_mode mode = { 0 }; @@ -1115,10 +1115,10 @@ static const char* const session_state_table[_SESSION_STATE_MAX] = { DEFINE_STRING_TABLE_LOOKUP(session_state, SessionState); static const char* const session_type_table[_SESSION_TYPE_MAX] = { + [SESSION_UNSPECIFIED] = "unspecified", [SESSION_TTY] = "tty", [SESSION_X11] = "x11", [SESSION_WAYLAND] = "wayland", - [SESSION_UNSPECIFIED] = "unspecified", }; DEFINE_STRING_TABLE_LOOKUP(session_type, SessionType);