summaryrefslogtreecommitdiff
path: root/timer.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-26 04:18:44 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-26 04:18:44 +0100
commit034c6ed7da5e44bfdde5a5d0da75f7b7a59953b8 (patch)
treeea59315075d3ebda2de695b1bd0621d79fa9e987 /timer.c
parent9152c765065184d0c1267ed2499e3fe4cac53755 (diff)
first attempt at proper service/socket logic
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
};