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;
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);
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);
if (!ih) {
if (!idle_hint) {
- if (k.monotonic < ts.monotonic)
+ if (k.monotonic > ts.monotonic)
ts = k;
} else {
idle_hint = false;