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:
commit
0de4bf409c
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user