mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
only call HOOK_DESTROY callback if hook supports it
This commit is contained in:
parent
8240bf52c9
commit
671e964d43
1 changed files with 3 additions and 1 deletions
|
@ -36,7 +36,9 @@ int hook_init(struct hook *h, struct list *nodes, struct list *paths, struct set
|
|||
void hook_destroy(struct hook *h)
|
||||
{
|
||||
struct hook_info i = { NULL };
|
||||
h->cb(h, HOOK_DESTROY, &i);
|
||||
|
||||
if (h->type & HOOK_DESTROY)
|
||||
h->cb(h, HOOK_DESTROY, &i);
|
||||
}
|
||||
|
||||
int hook_copy(struct hook *h, struct hook *c)
|
||||
|
|
Loading…
Add table
Reference in a new issue