diff --git a/lib/node.c b/lib/node.c index b94f3bcbf..eaaa20193 100644 --- a/lib/node.c +++ b/lib/node.c @@ -99,8 +99,12 @@ static int node_direction_parse(struct node_direction *nd, struct node *n, json_ jerror(&err, "Failed to parse node %s", node_name(n)); #ifdef WITH_HOOKS + int m = nd == &n->out + ? HOOK_NODE_WRITE + : HOOK_NODE_READ; + if (json_hooks) { - ret = hook_parse_list(&nd->hooks, json_hooks, NULL, n); + ret = hook_parse_list(&nd->hooks, json_hooks, m, NULL, n); if (ret < 0) return ret; } diff --git a/lib/path.c b/lib/path.c index 50a031cbe..d82790082 100644 --- a/lib/path.c +++ b/lib/path.c @@ -592,7 +592,7 @@ int path_parse(struct path *p, json_t *cfg, struct list *nodes) #ifdef WITH_HOOKS if (json_hooks) { - ret = hook_parse_list(&p->hooks, json_hooks, p, NULL); + ret = hook_parse_list(&p->hooks, json_hooks, HOOK_PATH, p, NULL); if (ret) return ret; }