Commit 920e1d36 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't call any VFP->fini until we call all VFP->fini, and always call

it, no matter what.
parent e5813c05
...@@ -114,7 +114,7 @@ vfp_suck_fini(struct busyobj *bo) ...@@ -114,7 +114,7 @@ vfp_suck_fini(struct busyobj *bo)
struct vfp_entry *vfe; struct vfp_entry *vfe;
VTAILQ_FOREACH(vfe, &bo->vfp, list) VTAILQ_FOREACH(vfe, &bo->vfp, list)
if(vfe->closed == VFP_OK && vfe->vfp->fini != NULL) if(vfe->vfp->fini != NULL)
vfe->vfp->fini(bo, vfe); vfe->vfp->fini(bo, vfe);
} }
...@@ -162,8 +162,6 @@ VFP_Suck(struct busyobj *bo, void *p, ssize_t *lp) ...@@ -162,8 +162,6 @@ VFP_Suck(struct busyobj *bo, void *p, ssize_t *lp)
} else if (vfe->closed == VFP_OK) { } else if (vfe->closed == VFP_OK) {
vp = vfe->vfp->pull(bo, vfe, p, lp); vp = vfe->vfp->pull(bo, vfe, p, lp);
if (vp == VFP_END || vp == VFP_ERROR) { if (vp == VFP_END || vp == VFP_ERROR) {
if (vfe->vfp->fini != NULL)
vfe->vfp->fini(bo, vfe);
vfe->closed = vp; vfe->closed = vp;
} else if (vp != VFP_OK) } else if (vp != VFP_OK)
(void)VFP_Error(bo, "Fetch filter %s returned %d", (void)VFP_Error(bo, "Fetch filter %s returned %d",
......
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