mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Merge branch 'develop' of git.rwth-aachen.de:acs/public/villas/VILLASnode into develop
This commit is contained in:
commit
20d64ef781
2 changed files with 9 additions and 4 deletions
|
@ -109,6 +109,9 @@ int hook_list_prepare(vlist *hs, vlist *sigs, int m, struct path *p, struct node
|
|||
{
|
||||
assert(hs->state == STATE_INITIALIZED);
|
||||
|
||||
if (!m)
|
||||
goto skip_add;
|
||||
|
||||
/* Add internal hooks if they are not already in the list */
|
||||
for (auto f : plugin::Registry::lookup<HookFactory>()) {
|
||||
if ((f->getFlags() & m) == m) {
|
||||
|
@ -118,6 +121,7 @@ int hook_list_prepare(vlist *hs, vlist *sigs, int m, struct path *p, struct node
|
|||
}
|
||||
}
|
||||
|
||||
skip_add:
|
||||
/* We sort the hooks according to their priority */
|
||||
vlist_sort(hs, (cmp_cb_t) hook_cmp_priority);
|
||||
|
||||
|
|
|
@ -221,11 +221,12 @@ int node_direction_stop(struct node_direction *nd, struct node *n)
|
|||
|
||||
struct vlist * node_direction_get_signals(struct node_direction *nd)
|
||||
{
|
||||
#ifdef WITH_HOOKS
|
||||
assert(nd->state == STATE_PREPARED);
|
||||
|
||||
return hook_list_get_signals(&nd->hooks);
|
||||
#else
|
||||
return &nd->signals;
|
||||
#ifdef WITH_HOOKS
|
||||
if (vlist_length(&nd->hooks) > 0)
|
||||
return hook_list_get_signals(&nd->hooks);
|
||||
#endif
|
||||
|
||||
return &nd->signals;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue