mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
path: run hooks again
This commit is contained in:
parent
8f61d4f2a9
commit
78ff84eef1
1 changed files with 15 additions and 1 deletions
16
lib/path.c
16
lib/path.c
|
@ -117,12 +117,26 @@ static void path_source_read(struct path_source *ps, struct path *p, int i)
|
|||
|
||||
debug(15, "Path %s received = %s", path_name(p), bitset_dump(&p->received));
|
||||
|
||||
#ifdef WITH_HOOKS
|
||||
int toenqueue = hook_process_list(&p->hooks, muxed_smps, tomux);
|
||||
if (toenqueue != tomux) {
|
||||
int skipped = tomux - toenqueue;
|
||||
|
||||
debug(LOG_NODES | 10, "Hooks skipped %u out of %u samples for path %s", skipped, timux, path_name(p));
|
||||
|
||||
if (p->stats)
|
||||
stats_update(p->stats, STATS_SKIPPED, skipped);
|
||||
}
|
||||
#else
|
||||
int toenqueue = tomux;
|
||||
#endif
|
||||
|
||||
if (bitset_test(&p->mask, i)) {
|
||||
/* Check if we received an update from all nodes/ */
|
||||
if ((p->mode == PATH_MODE_ANY) ||
|
||||
(p->mode == PATH_MODE_ALL && !bitset_cmp(&p->mask, &p->received)))
|
||||
{
|
||||
path_destination_enqueue(p, muxed_smps, tomux);
|
||||
path_destination_enqueue(p, muxed_smps, toenqueue);
|
||||
|
||||
/* Reset bitset of updated nodes */
|
||||
bitset_clear_all(&p->received);
|
||||
|
|
Loading…
Add table
Reference in a new issue