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

path: fix detection of output signals for paths without any hooks configured

This commit is contained in:
Steffen Vogel 2021-02-23 02:24:36 +01:00 committed by Steffen Vogel
parent 6f38977f59
commit 4ae1b1cbfd

View file

@ -797,9 +797,13 @@ struct vlist * path_signals(struct vpath *p)
struct vlist * path_output_signals(struct vpath *p)
{
#ifdef WITH_HOOKS
Hook *last_hook = (Hook *) vlist_last(&p->hooks);
if (vlist_length(&p->hooks) > 0) {
Hook *last_hook = (Hook *) vlist_last(&p->hooks);
return last_hook->getSignals();
return last_hook->getSignals();
}
else
return &p->signals;
#else
return &p->signals;
#endif