Commit 328f71c1 authored by Nils Goroll's avatar Nils Goroll

use the transport_priv only for esi_level > 0

parent 3e2f9c5b
...@@ -1732,7 +1732,10 @@ pesi_buf_bytes(struct req *req, enum vdp_action act, void **priv, ...@@ -1732,7 +1732,10 @@ pesi_buf_bytes(struct req *req, enum vdp_action act, void **priv,
struct pesi *pesi; struct pesi *pesi;
unsigned refok; unsigned refok;
CAST_OBJ_NOTNULL(tree, *priv, BYTES_TREE_MAGIC); CAST_OBJ_NOTNULL(pesi, *priv, PESI_MAGIC);
CHECK_OBJ_NOTNULL(pesi->pesi_tree, PESI_TREE_MAGIC);
tree = pesi->pesi_tree->tree;
CHECK_OBJ_NOTNULL(tree, BYTES_TREE_MAGIC);
// magic pointers in use, so no check for len == 0 // magic pointers in use, so no check for len == 0
if (tree->retval || ptr == NULL) if (tree->retval || ptr == NULL)
...@@ -1740,7 +1743,6 @@ pesi_buf_bytes(struct req *req, enum vdp_action act, void **priv, ...@@ -1740,7 +1743,6 @@ pesi_buf_bytes(struct req *req, enum vdp_action act, void **priv,
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CAST_OBJ_NOTNULL(pesi, req->transport_priv, PESI_MAGIC);
if (pesi->bypass) { if (pesi->bypass) {
AZ(req->esi_level); AZ(req->esi_level);
return (VDP_bytes(req, act, ptr, len)); return (VDP_bytes(req, act, ptr, len));
...@@ -2016,9 +2018,8 @@ vdp_pesi_init(struct req *req, void **priv) ...@@ -2016,9 +2018,8 @@ vdp_pesi_init(struct req *req, void **priv)
pecx->node = pesi_tree->tree->root; pecx->node = pesi_tree->tree->root;
AZ(pecx->state); AZ(pecx->state);
AZ(pecx->woken); AZ(pecx->woken);
req->transport_priv = pesi;
VDP_Push(req, &VDP_pesi_buf, pesi_tree->tree); VDP_Push(req, &VDP_pesi_buf, pesi);
return (0); return (0);
} }
...@@ -2049,9 +2050,8 @@ vdp_pesi_fini(struct req *req, void **priv) ...@@ -2049,9 +2050,8 @@ vdp_pesi_fini(struct req *req, void **priv)
node = pecx->node; node = pecx->node;
CHECK_OBJ_NOTNULL(node, NODE_MAGIC); CHECK_OBJ_NOTNULL(node, NODE_MAGIC);
assert(pesi == req->transport_priv);
if (req->esi_level > 0) { if (req->esi_level > 0) {
assert(req->transport_priv == pesi);
*priv = NULL; *priv = NULL;
req->transport_priv = NULL; req->transport_priv = NULL;
...@@ -2060,6 +2060,9 @@ vdp_pesi_fini(struct req *req, void **priv) ...@@ -2060,6 +2060,9 @@ vdp_pesi_fini(struct req *req, void **priv)
return (0); return (0);
} }
assert(req->transport_priv == NULL ||
*(unsigned *)req->transport_priv != PESI_MAGIC);
/* /*
* at this point, the tree must be delivered completely, but * at this point, the tree must be delivered completely, but
* tasks our shared data structures could still be running * tasks our shared data structures could still be running
...@@ -2576,7 +2579,7 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody) ...@@ -2576,7 +2579,7 @@ 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, tree); VDP_Push(req, &VDP_pesi_buf, pesi);
XXXAZ(push_vdps(req, &parent->nexus.gzip)); XXXAZ(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));
......
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