From 31dad7754e7d536bc6a30be90cf30cc28fa5a983 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 8 Apr 2019 08:59:38 +0200 Subject: [PATCH] nodes: properly initialize instance list --- lib/nodes/rtp.cpp | 2 +- lib/nodes/stats.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/nodes/rtp.cpp b/lib/nodes/rtp.cpp index 8a5054bdd..0ebceed33 100644 --- a/lib/nodes/rtp.cpp +++ b/lib/nodes/rtp.cpp @@ -55,7 +55,6 @@ static pthread_t re_pthread; using namespace villas::node; -/* Forward declarations */ static struct plugin p; static int rtp_set_rate(struct node *n, double rate) @@ -670,6 +669,7 @@ static void register_plugin() { p.node.poll_fds = rtp_poll_fds; p.node.netem_fds = rtp_netem_fds; + vlist_init(&p.node.instances); vlist_push(&plugins, &p); } diff --git a/lib/nodes/stats.cpp b/lib/nodes/stats.cpp index 4226e9694..f1640bdb4 100644 --- a/lib/nodes/stats.cpp +++ b/lib/nodes/stats.cpp @@ -260,6 +260,7 @@ static void register_plugin() { p.name = "stats"; p.description = "Send statistics to another node"; p.type = PLUGIN_TYPE_NODE; + p.node.instances.state = STATE_DESTROYED; p.node.vectorize = 1; p.node.flags = 0; p.node.size = sizeof(struct stats_node); @@ -273,6 +274,7 @@ static void register_plugin() { p.node.read = stats_node_read; p.node.poll_fds = stats_node_poll_fds; + vlist_init(&p.node.instances); vlist_push(&plugins, &p); }