X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogin%2Flogind-seat.c;h=470d08bc05dbd13d68184f4178416cca72eb0b71;hp=937315ebf1ab17c4fa8a9b0ab61003c784451ed4;hb=d0af76e68a5bab2e4fd9674b1c64a9f38d7afe97;hpb=877d54e9b09e093c2102f519a84e2a52637ae035 diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 937315ebf..470d08bc0 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -263,7 +263,8 @@ int seat_set_active(Seat *s, Session *session) { if (old_active) { session_save(old_active); - user_save(old_active->user); + if (!session || session->user != old_active->user) + user_save(old_active->user); } return 0; @@ -340,7 +341,7 @@ int seat_start(Seat *s) { return 0; log_struct(LOG_INFO, - "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(SD_MESSAGE_SEAT_START), + MESSAGE_ID(SD_MESSAGE_SEAT_START), "SEAT_ID=%s", s->id, "MESSAGE=New seat %s.", s->id, NULL); @@ -368,7 +369,7 @@ int seat_stop(Seat *s) { if (s->started) log_struct(LOG_INFO, - "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(SD_MESSAGE_SEAT_STOP), + MESSAGE_ID(SD_MESSAGE_SEAT_STOP), "SEAT_ID=%s", s->id, "MESSAGE=Removed seat %s.", s->id, NULL); @@ -470,7 +471,7 @@ int seat_get_idle_hint(Seat *s, dual_timestamp *t) { if (!ih) { if (!idle_hint) { - if (k.monotonic < ts.monotonic) + if (k.monotonic > ts.monotonic) ts = k; } else { idle_hint = false;