Commit f93860ab authored by Nils Goroll's avatar Nils Goroll

make VRT_handling a no-op if no ctx->handling pointer

This is the case for the ctx created for director operations as first
introduced with 5536f102

Alternatively, we could always set ctx->handling to some location
with the same scope as the ctx, but as we are not inside VCL (and
just happen to use the same context for simplicity and reusability
of VRT/vmod functions), adding specific handling appears to be the
cleaner solution.

Fixes #2692
parent a56469c3
......@@ -376,6 +376,8 @@ VRT_handling(VRT_CTX, unsigned hand)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->handling == NULL)
return;
assert(hand > 0);
assert(hand < VCL_RET_MAX);
// XXX:NOTYET assert(*ctx->handling == 0);
......
......@@ -179,7 +179,7 @@ struct vrt_ctx {
unsigned syntax;
unsigned method;
unsigned *handling;
unsigned *handling; // not in director context
unsigned vclver;
struct vsb *msg; // Only in ...init()
......
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