diff --git a/include/villas/hooks.h b/include/villas/hooks.h index f88635a21..66501985b 100644 --- a/include/villas/hooks.h +++ b/include/villas/hooks.h @@ -110,9 +110,7 @@ enum hook_type { /** Hooks which are using private data must allocate and free them propery. */ HOOK_STORAGE = HOOK_INIT | HOOK_DESTROY, /** All path related actions */ - HOOK_PATH = HOOK_PATH_START | HOOK_PATH_STOP | HOOK_PATH_RESTART, - /** Hooks which are used to collect statistics. */ - HOOK_STATS = HOOK_STORAGE | HOOK_PATH | HOOK_READ | HOOK_PERIODIC, + HOOK_PATH = HOOK_PATH_START | HOOK_PATH_STOP | HOOK_PATH_RESTART /** @} */ }; diff --git a/lib/hooks/hooks-stats.c b/lib/hooks/hooks-stats.c index f9fb97b7f..bd78d3c87 100644 --- a/lib/hooks/hooks-stats.c +++ b/lib/hooks/hooks-stats.c @@ -14,7 +14,7 @@ extern struct list *hook_nodes; -REGISTER_HOOK("stats", "Collect statistics for the current path", 2, 1, hook_stats, HOOK_STATS) +REGISTER_HOOK("stats", "Collect statistics for the current path", 2, 1, hook_stats, HOOK_STORAGE | HOOK_PATH | HOOK_READ | HOOK_PERIODIC) int hook_stats(struct hook *h, int when, struct hook_info *j) { struct stats *s = hook_storage(h, when, sizeof(struct stats), (ctor_cb_t) stats_init, (dtor_cb_t) stats_destroy);