mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Merge branch 'nrg5-fixes' into 'develop'
NRG5 fixes See merge request acs/public/villas/VILLASnode!48
This commit is contained in:
commit
0bc3c3d362
2 changed files with 16 additions and 10 deletions
|
@ -164,7 +164,7 @@ static void register_plugin() {
|
|||
p.type = PluginType::NODE;
|
||||
p.node.instances.state = State::DESTROYED;
|
||||
p.node.vectorize = 0;
|
||||
p.node.flags = (int) NodeFlags::PROVIDES_SIGNALS;
|
||||
p.node.flags = 0;
|
||||
p.node.size = sizeof(struct loopback);
|
||||
p.node.parse = loopback_parse;
|
||||
p.node.print = loopback_print;
|
||||
|
|
24
lib/path.cpp
24
lib/path.cpp
|
@ -148,6 +148,9 @@ int path_init(struct path *p)
|
|||
|
||||
p->_name = nullptr;
|
||||
|
||||
p->reader.pfds = nullptr;
|
||||
p->reader.nfds = 0;
|
||||
|
||||
/* Default values */
|
||||
p->mode = PathMode::ANY;
|
||||
p->rate = 0; /* Disabled */
|
||||
|
@ -168,6 +171,9 @@ static int path_prepare_poll(struct path *p)
|
|||
{
|
||||
int fds[16], ret, n = 0, m;
|
||||
|
||||
if (p->reader.pfds)
|
||||
free(p->reader.pfds);
|
||||
|
||||
p->reader.pfds = nullptr;
|
||||
p->reader.nfds = 0;
|
||||
|
||||
|
@ -297,13 +303,6 @@ int path_prepare(struct path *p)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Prepare poll() */
|
||||
if (p->poll) {
|
||||
ret = path_prepare_poll(p);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (p->original_sequence_no == -1)
|
||||
p->original_sequence_no = vlist_length(&p->sources) == 1;
|
||||
|
||||
|
@ -628,6 +627,15 @@ int path_start(struct path *p)
|
|||
p->last_sample->data[i] = sig->init;
|
||||
}
|
||||
|
||||
/* Prepare poll() */
|
||||
if (p->poll) {
|
||||
ret = path_prepare_poll(p);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
p->state = State::STARTED;
|
||||
|
||||
/* Start one thread per path for sending to destinations
|
||||
*
|
||||
* Special case: If the path only has a single source and this source
|
||||
|
@ -638,8 +646,6 @@ int path_start(struct path *p)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
p->state = State::STARTED;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue