From c8ba97d94e43733d70950667667ba55736b3ae28 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 15 Jun 2018 14:33:22 +0200 Subject: [PATCH] node: disable directions by default, enable them if config section in/out is available --- lib/node.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/node.c b/lib/node.c index 8f43da263..7b03c5317 100644 --- a/lib/node.c +++ b/lib/node.c @@ -35,7 +35,7 @@ static int node_direction_init(struct node_direction *nd, struct node *n) { - nd->enabled = 1; + nd->enabled = 0; nd->vectorize = 1; nd->builtin = 1; @@ -98,12 +98,14 @@ static int node_direction_parse(struct node_direction *nd, struct node *n, json_ json_t *json_signals = NULL; nd->cfg = cfg; + nd->enabled = 1; - ret = json_unpack_ex(cfg, &err, 0, "{ s?: o, s?: o, s?: i, s?: b }", + ret = json_unpack_ex(cfg, &err, 0, "{ s?: o, s?: o, s?: i, s?: b, s?: b }", "hooks", &json_hooks, "signals", &json_signals, "vectorize", &nd->vectorize, - "builtin", &nd->builtin + "builtin", &nd->builtin, + "enabled", &nd->enabled ); if (ret) jerror(&err, "Failed to parse node '%s'", node_name(n));