bin/varnishd/cache/cache_vcl.c
static int
vcl_event_handling(VRT_CTX)
{
	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);

	if (*ctx->handling == 0)
		return (0);

	assert(*ctx->handling == VCL_RET_FAIL);

	if (ctx->method == VCL_MET_INIT)
		return (1);

	/*
	 * EVENT_WARM / EVENT_COLD: method == 0
	 * must not set handling
	 */
	assert(ctx->method == VCL_MET_FINI);

	*ctx->handling = 0;
	VRT_fail(ctx, "VRT_fail() from vcl_fini{} has no effect");
	return (0);
}
/* VRT_fail() can be called
 * - from the vcl sub via a vmod
 * - via a PRIV_TASK .fini callback
 *
 * if this happens during init, we fail it
 * if during fini, we ignore, because otherwise VMOD authors would be forced to
 * handle VCL_MET_FINI specifically everywhere.
 */
VRT_fail() can be called
- from the vcl sub via a vmod
- via a PRIV_TASK .fini callback

if this happens during init, we fail it
if during fini, we ignore, because otherwise VMOD authors would be forced to
handle VCL_MET_FINI specifically everywhere.
VRT_fail () can be called - from the vcl sub via a vmod - via a PRIV_TASK . fini callback if this happens during init we fail it if during fini we ignore because otherwise VMOD authors would be forced to handle VCL_MET_FINI specifically everywhere .
static int
vcl_event_handling(VRT_CTX)
{
	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
	if (*ctx->handling == 0)
		return (0);
	assert(*ctx->handling == VCL_RET_FAIL);
	if (ctx->method == VCL_MET_INIT)
		return (1);
	assert(ctx->method == VCL_MET_FINI);
	*ctx->handling = 0;
	VRT_fail(ctx, "VRT_fail() from vcl_fini{} has no effect");
	return (0);
}
static int vcl_event_handling ( VRT_CTX ) { CHECK_OBJ_NOTNULL ( ctx , VRT_CTX_MAGIC ) ; if ( * ctx -> handling == 0 ) return ( 0 ) ; assert ( * ctx -> handling == VCL_RET_FAIL ) ; if ( ctx -> method == VCL_MET_INIT ) return ( 1 ) ; assert ( ctx -> method == VCL_MET_FINI ) ; * ctx -> handling = 0 ; VRT_fail ( ctx , " " ) ; return ( 0 ) ; }
VRT_fail() can be called
 - from the vcl sub via a vmod
 - via a PRIV_TASK .fini callback
VRT_fail () can be called - from the vcl sub via a vmod - via a PRIV_TASK . fini callback
/*
	 * EVENT_WARM / EVENT_COLD: method == 0
	 * must not set handling
	 */