mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
node: avoid segfaults when signals are nullptr
This can be an issue if we use a node without SuperNode. Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
d473b36060
commit
45307bcc16
1 changed files with 5 additions and 4 deletions
|
@ -336,12 +336,13 @@ int Node::write(struct Sample *smps[], unsigned cnt) {
|
||||||
|
|
||||||
const std::string &Node::getNameFull() {
|
const std::string &Node::getNameFull() {
|
||||||
if (name_full.empty()) {
|
if (name_full.empty()) {
|
||||||
|
auto is1 = (getInputSignals(false) ? getInputSignals(false)->size() : 0);
|
||||||
|
auto is2 = (getInputSignals(true) ? getInputSignals(true)->size() : 0);
|
||||||
name_full = fmt::format("{}: uuid={}, #in.signals={}/{}, #in.hooks={}, "
|
name_full = fmt::format("{}: uuid={}, #in.signals={}/{}, #in.hooks={}, "
|
||||||
"#out.hooks={}, in.vectorize={}, out.vectorize={}",
|
"#out.hooks={}, in.vectorize={}, out.vectorize={}",
|
||||||
getName(), uuid::toString(uuid).c_str(),
|
getName(), uuid::toString(uuid).c_str(), is1, is2,
|
||||||
getInputSignals(false)->size(),
|
in.hooks.size(), out.hooks.size(), in.vectorize,
|
||||||
getInputSignals(true)->size(), in.hooks.size(),
|
out.vectorize);
|
||||||
out.hooks.size(), in.vectorize, out.vectorize);
|
|
||||||
|
|
||||||
#ifdef WITH_NETEM
|
#ifdef WITH_NETEM
|
||||||
name_full += fmt::format(", out.netem={}", tc_qdisc ? "yes" : "no");
|
name_full += fmt::format(", out.netem={}", tc_qdisc ? "yes" : "no");
|
||||||
|
|
Loading…
Add table
Reference in a new issue