1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

netem: fix compiler errors

This commit is contained in:
Steffen Vogel 2019-01-21 22:14:51 +01:00
parent 4533e0ab12
commit 42e51e04c5
2 changed files with 10 additions and 5 deletions

View file

@ -183,8 +183,8 @@ int node_init(struct node *n, struct node_type *vt)
n->_name_long = NULL;
#ifdef WITH_NETEM
s->tc_qdisc = NULL;
s->tc_classifier = NULL;
n->tc_qdisc = NULL;
n->tc_classifier = NULL;
#endif /* WITH_NETEM */
n->signals.state = STATE_DESTROYED;
@ -262,9 +262,9 @@ int node_parse(struct node *n, json_t *json, const char *name)
jerror(&err, "Failed to parse setting 'netem' of node %s", node_name(n));
if (enabled)
tc_netem_parse(&s->tc_qdisc, json_netem);
tc_netem_parse(&n->tc_qdisc, json_netem);
else
s->tc_qdisc = NULL;
n->tc_qdisc = NULL;
#endif /* WITH_NETEM */
}
@ -635,11 +635,12 @@ char * node_name_long(struct node *n)
if (node_type(n)->print) {
struct node_type *vt = node_type(n);
char *name_long = vt->print(n);
strcatf(&n->_name_long, "%s: #in.signals=%zu, #in.hooks=%zu, in.vectorize=%d, #out.hooks=%zu, out.vectorize=%d, %s",
strcatf(&n->_name_long, "%s: #in.signals=%zu, #in.hooks=%zu, in.vectorize=%d, #out.hooks=%zu, out.vectorize=%d, out.netem=%s, %s",
node_name(n),
vlist_length(&n->signals),
vlist_length(&n->in.hooks), n->in.vectorize,
vlist_length(&n->out.hooks), n->out.vectorize,
n->tc_qdisc ? "yes" : "no",
name_long
);

View file

@ -40,6 +40,10 @@
#include <villas/kernel/rt.hpp>
#include <villas/kernel/if.h>
#ifdef WITH_NETEM
#include <villas/kernel/nl.h>
#endif
using namespace villas;
using namespace villas::node;