vf: mark filter chain as uninitialized when mutating it

Sounds fair. Can be used to determine if the filter chain was mutated at
all, and avoiding unconditional reinit if it wasn't.
This commit is contained in:
wm4
2016-07-06 13:47:58 +02:00
parent 0b1ef81498
commit 08cd50b84b

View File

@@ -298,6 +298,7 @@ void vf_remove_filter(struct vf_chain *c, struct vf_instance *vf)
assert(prev); // not inserted
prev->next = vf->next;
vf_uninit_filter(vf);
c->initialized = 0;
}
struct vf_instance *vf_append_filter(struct vf_chain *c, const char *name,
@@ -312,6 +313,7 @@ struct vf_instance *vf_append_filter(struct vf_chain *c, const char *name,
pprev = &(*pprev)->next;
vf->next = *pprev ? *pprev : NULL;
*pprev = vf;
c->initialized = 0;
}
return vf;
}