diff options
Diffstat (limited to 'src/timer.c')
-rw-r--r-- | src/timer.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/timer.c b/src/timer.c index 1580478949..cd6728a186 100644 --- a/src/timer.c +++ b/src/timer.c @@ -450,6 +450,17 @@ fail: log_error("Failed find timer unit: %s", strerror(-r)); } +static void timer_reset_maintenance(Unit *u) { + Timer *t = TIMER(u); + + assert(t); + + if (t->state == TIMER_MAINTENANCE) + timer_set_state(t, TIMER_DEAD); + + t->failure = false; +} + static const char* const timer_state_table[_TIMER_STATE_MAX] = { [TIMER_DEAD] = "dead", [TIMER_WAITING] = "waiting", @@ -492,5 +503,7 @@ const UnitVTable timer_vtable = { .timer_event = timer_timer_event, + .reset_maintenance = timer_reset_maintenance, + .bus_message_handler = bus_timer_message_handler }; |