1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-09 12:58:26 +03:00

Merge pull request #27752 from DaanDeMeyer/timer-oncalendar-fix

core/timer: Always use inactive_exit_timestamp if it is set
This commit is contained in:
Daan De Meyer 2023-05-24 14:39:32 +02:00 committed by GitHub
commit 0de4bf409c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -399,14 +399,12 @@ static void timer_enter_waiting(Timer *t, bool time_change) {
* to that. If we don't, just start from
* the activation time. */
if (t->last_trigger.realtime > 0)
if (dual_timestamp_is_set(&t->last_trigger))
b = t->last_trigger.realtime;
else {
if (state_translation_table[t->state] == UNIT_ACTIVE)
b = UNIT(t)->inactive_exit_timestamp.realtime;
else
b = ts.realtime;
}
else if (dual_timestamp_is_set(&UNIT(t)->inactive_exit_timestamp))
b = UNIT(t)->inactive_exit_timestamp.realtime;
else
b = ts.realtime;
r = calendar_spec_next_usec(v->calendar_spec, b, &v->next_elapse);
if (r < 0)