Commit ecfd1eb0 authored by Nils Goroll's avatar Nils Goroll

make VFP_Close() idempotent

required for #3009
parent 0ba4d294
......@@ -118,13 +118,14 @@ VFP_Setup(struct vfp_ctx *vc, struct worker *wrk)
void
VFP_Close(struct vfp_ctx *vc)
{
struct vfp_entry *vfe;
struct vfp_entry *vfe, *tmp;
VTAILQ_FOREACH(vfe, &vc->vfp, list) {
VTAILQ_FOREACH_SAFE(vfe, &vc->vfp, list, tmp) {
if (vfe->vfp->fini != NULL)
vfe->vfp->fini(vc, vfe);
VSLb(vc->wrk->vsl, SLT_VfpAcct, "%s %ju %ju", vfe->vfp->name,
(uintmax_t)vfe->calls, (uintmax_t)vfe->bytes_out);
VTAILQ_REMOVE(&vc->vfp, vfe, list);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment