X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Ftimer.c;fp=src%2Fcore%2Ftimer.c;h=5c4e9f995a64888328728dfe86c4d8572ed3cc05;hb=779042e772d2459f7649b34a164902dc456f1bab;hp=a3713e2140d68fba370bf478b6af6899198544e3;hpb=f32d2db140150b9d38684a699c9875b6e24ca27c;p=elogind.git diff --git a/src/core/timer.c b/src/core/timer.c index a3713e214..5c4e9f995 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -521,6 +521,7 @@ fail: static int timer_start(Unit *u) { Timer *t = TIMER(u); + TimerValue *v; assert(t); assert(t->state == TIMER_DEAD || t->state == TIMER_FAILED); @@ -530,6 +531,11 @@ static int timer_start(Unit *u) { t->last_trigger = DUAL_TIMESTAMP_NULL; + /* Reenable all timers that depend on unit activation time */ + LIST_FOREACH(value, v, t->values) + if (v->base == TIMER_ACTIVE) + v->disabled = false; + if (t->stamp_path) { struct stat st;