Commit 0f30a816 authored by Nils Goroll's avatar Nils Goroll

remove gotos

parent b3eac3f0
...@@ -2611,13 +2611,17 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody) ...@@ -2611,13 +2611,17 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
CHECK_OBJ_NOTNULL(parent, NODE_MAGIC); CHECK_OBJ_NOTNULL(parent, NODE_MAGIC);
assert(parent->type == T_NEXUS); assert(parent->type == T_NEXUS);
if (wantbody == 0) if (wantbody == 0) {
goto close; // XXX VDP_close(req);
return;
}
VSLdbgv(req, "vped_deliver: ObjGetLen=%lu", VSLdbgv(req, "vped_deliver: ObjGetLen=%lu",
ObjGetLen(req->wrk, req->objcore)); ObjGetLen(req->wrk, req->objcore));
if (boc == NULL && ObjGetLen(req->wrk, req->objcore) == 0) if (boc == NULL && ObjGetLen(req->wrk, req->objcore) == 0) {
goto close; // XXX VDP_close(req);
return;
}
is_esi = ObjHasAttr(req->wrk, req->objcore, OA_ESIDATA); is_esi = ObjHasAttr(req->wrk, req->objcore, OA_ESIDATA);
is_final = (req->objcore->flags & OC_F_FINAL) != 0; is_final = (req->objcore->flags & OC_F_FINAL) != 0;
...@@ -2633,11 +2637,14 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody) ...@@ -2633,11 +2637,14 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
if (req->objcore->flags & OC_F_FAILED) { if (req->objcore->flags & OC_F_FAILED) {
/* No way of signalling errors in the middle of /* No way of signalling errors in the middle of
the ESI body. Omit this ESI fragment. */ the ESI body. Omit this ESI fragment. */
goto close; // XXX VDP_close(req);
return;
} }
} }
if (is_final && !is_esi && !use_thread_blocking) { if (is_final && !is_esi && !use_thread_blocking) {
VSLdbg(req, "vped_deliver: T_NEXUS buffering no ESI");
VDP_Push(req, &VDP_pesi_buf, pesi); VDP_Push(req, &VDP_pesi_buf, pesi);
AN(parent); AN(parent);
XXXAZ(push_vdps(req, &parent->nexus.gzip)); XXXAZ(push_vdps(req, &parent->nexus.gzip));
...@@ -2648,7 +2655,8 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody) ...@@ -2648,7 +2655,8 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
/* pesi_buf does not pesi_destroy() on fini */ /* pesi_buf does not pesi_destroy() on fini */
req->transport_priv = NULL; req->transport_priv = NULL;
pesi_destroy(&pesi); pesi_destroy(&pesi);
goto noesi; // XXX vped_close_vdp(req, 0, &VDP_pesi_buf);
return;
} }
else if (is_final && !is_esi) { else if (is_final && !is_esi) {
VSLdbg(req, "vped_deliver: T_FINAL"); VSLdbg(req, "vped_deliver: T_FINAL");
...@@ -2726,27 +2734,18 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody) ...@@ -2726,27 +2734,18 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
VSLdbg(req, "vped_deliver: ESI"); VSLdbg(req, "vped_deliver: ESI");
VDP_Push(req, &VDP_pesi_buf, pesi); VDP_Push(req, &VDP_pesi_buf, pesi);
XXXAZ(push_vdps(req, &parent->nexus.gzip)); AZ(push_vdps(req, &parent->nexus.gzip));
AN(parent); AN(parent);
AZ(VDP_Push(req, &vped_to_parent, parent->req)); AZ(VDP_Push(req, &vped_to_parent, parent->req));
(void)VDP_DeliverObj(req); (void)VDP_DeliverObj(req);
/* /*
* was: VDP_close(req);
*
* only close the pesi VDPs, the others are to run from topreq delivery * only close the pesi VDPs, the others are to run from topreq delivery
*
* XXX cleanup
*/ */
vped_close_vdp(req, 0, &VDP_pesi); vped_close_vdp(req, 0, &VDP_pesi);
noesi:
vped_close_vdp(req, 0, &VDP_pesi_buf); vped_close_vdp(req, 0, &VDP_pesi_buf);
out:
return; return;
close:
VDP_close(req);
goto out;
} }
static const struct transport VPED_transport = { static const struct transport VPED_transport = {
......
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