mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
skip hooks as soon as possible
This commit is contained in:
parent
1bf6d9e50a
commit
ab8723ba8f
1 changed files with 7 additions and 2 deletions
|
@ -42,9 +42,14 @@ static void path_write(struct path *p)
|
|||
int path_run_hook(struct path *p, enum hook_type t)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
list_foreach(struct hook *h, &p->hooks) {
|
||||
if (h->type & t)
|
||||
ret += ((hook_cb_t) h->cb)(p, h, t);
|
||||
if (h->type & t) {
|
||||
ret = ((hook_cb_t) h->cb)(p, h, t);
|
||||
debug(22, "Running hook when=%u '%s' prio=%u ret=%d", t, h->name, h->priority, ret);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue