Mailing List Archive

[master] 21eb6a170 Save VPI_count() info to struct wrk_vpi
commit 21eb6a1700ea0c7a5726d27b14c2908aee714b62
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Tue Feb 9 12:51:49 2021 +0100

Save VPI_count() info to struct wrk_vpi

So we have it available for Panics in a follow-up commit

diff --git a/bin/varnishd/cache/cache_vpi.c b/bin/varnishd/cache/cache_vpi.c
index 302523c39..e22cc6377 100644
--- a/bin/varnishd/cache/cache_vpi.c
+++ b/bin/varnishd/cache/cache_vpi.c
@@ -67,6 +67,7 @@ VPI_count(VRT_CTX, unsigned u)
CHECK_OBJ_NOTNULL(ctx->vcl, VCL_MAGIC);
CHECK_OBJ_NOTNULL(ctx->vcl->conf, VCL_CONF_MAGIC);
assert(u < ctx->vcl->conf->nref);
+ ctx->vpi->ref = u;
if (ctx->vsl != NULL)
VSLb(ctx->vsl, SLT_VCL_trace, "%s %u %u.%u.%u",
ctx->vcl->loaded_name, u, ctx->vcl->conf->ref[u].source,
diff --git a/include/vcc_interface.h b/include/vcc_interface.h
index 4a51868cd..394f308a0 100644
--- a/include/vcc_interface.h
+++ b/include/vcc_interface.h
@@ -58,6 +58,7 @@ struct wrk_vpi {
unsigned magic;
#define WRK_VPI_MAGIC 0xaa3d3df3
unsigned handling;
+ unsigned ref; // index into (struct vpi_ref)[]
};


_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit