summaryrefslogtreecommitdiff
path: root/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'timer.c')
-rw-r--r--timer.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/timer.c b/timer.c
index b1571ce7ea..0c891368f8 100644
--- a/timer.c
+++ b/timer.c
@@ -3,6 +3,12 @@
#include "name.h"
#include "timer.h"
+static void timer_done(Name *n) {
+ Timer *t = TIMER(n);
+
+ assert(t);
+}
+
static NameActiveState timer_active_state(Name *n) {
static const NameActiveState table[_TIMER_STATE_MAX] = {
@@ -14,26 +20,11 @@ static NameActiveState timer_active_state(Name *n) {
return table[TIMER(n)->state];
}
-static void timer_free_hook(Name *n) {
- Timer *t = TIMER(n);
-
- assert(t);
-
- if (t->service)
- t->service->timer = NULL;
-}
-
const NameVTable timer_vtable = {
.suffix = ".timer",
- .load = name_load_fragment_and_dropin,
- .dump = NULL,
-
- .start = NULL,
- .stop = NULL,
- .reload = NULL,
-
- .active_state = timer_active_state,
+ .init = name_load_fragment_and_dropin,
+ .done = timer_done,
- .free_hook = timer_free_hook
+ .active_state = timer_active_state
};