diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-26 04:18:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-26 04:18:44 +0100 |
commit | 034c6ed7da5e44bfdde5a5d0da75f7b7a59953b8 (patch) | |
tree | ea59315075d3ebda2de695b1bd0621d79fa9e987 /timer.c | |
parent | 9152c765065184d0c1267ed2499e3fe4cac53755 (diff) |
first attempt at proper service/socket logic
Diffstat (limited to 'timer.c')
-rw-r--r-- | timer.c | 27 |
1 files changed, 9 insertions, 18 deletions
@@ -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 }; |