Commit f8914faa authored by Geoff Simmons's avatar Geoff Simmons

vxid() restored -- uses ctx workspace and does not require a private context

parent 798cba43
......@@ -156,20 +156,21 @@ vmod_vtstor_delete(VRT_CTX, struct vmod_vtstor_vtstor *vmi, VCL_HEADER hdr)
}
}
#if 0
VCL_STRING __match_proto__(td_vmod_vxid)
vmod_vxid(VRT_CTX, struct vmod_priv *priv)
vmod_vxid(VRT_CTX)
{
char *p;
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(ctx->req, REQ_MAGIC);
if(priv->priv == NULL) {
priv->priv = malloc(sizeof(char) * 11);
snprintf(priv->priv, 11, "%u", ctx->req->sp->vxid);
priv->free = free;
}
return(priv->priv);
CHECK_OBJ_NOTNULL(ctx->req->sp, SESS_MAGIC);
p = WS_Printf(ctx->ws, "%u", ctx->req->sp->vxid);
if (p == NULL)
VSLb(ctx->vsl, SLT_VCL_Error,
"vmod vtstor: insufficient workspace in vxid()");
return p;
}
#endif
VCL_STRING __match_proto__(td_vmod_version)
vmod_version(VRT_CTX)
......
......@@ -33,6 +33,6 @@ $Method VOID .store(STRING, HEADER)
$Method STRING .get(HEADER)
$Method VOID .delete(HEADER)
# $Function STRING vxid(PRIV_TASK)
$Function STRING vxid()
$Function STRING version()
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