[master] 322941b18 Add debug.vsl_flush()

Nils Goroll nils.goroll at uplex.de
Mon Oct 10 16:30:12 UTC 2022


commit 322941b18e34d79331cd53090a75be0466f146d3
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Oct 10 18:21:55 2022 +0200

    Add debug.vsl_flush()

diff --git a/vmod/vmod_debug.c b/vmod/vmod_debug.c
index f1e2d35cd..a94ae3ab3 100644
--- a/vmod/vmod_debug.c
+++ b/vmod/vmod_debug.c
@@ -886,6 +886,13 @@ xyzzy_return_strands(VRT_CTX, VCL_STRANDS strand)
 	return (strand);
 }
 
+VCL_VOID
+xyzzy_vsl_flush(VRT_CTX)
+{
+	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
+	VSL_Flush(ctx->vsl, 0);
+}
+
 /*---------------------------------------------------------------------*/
 
 static const struct vcf_return * v_matchproto_(vcf_func_f)
diff --git a/vmod/vmod_debug.vcc b/vmod/vmod_debug.vcc
index 90be677d6..ced0725e9 100644
--- a/vmod/vmod_debug.vcc
+++ b/vmod/vmod_debug.vcc
@@ -277,6 +277,10 @@ Test object method with all the fancy stuff.
 
 $Function STRANDS return_strands(STRANDS strand)
 
+$Function VOID vsl_flush()
+
+call VSL_Flush(ctx->cts, 0)
+
 $Function VOID catflap(ENUM {miss, first, last} type)
 
 Test the HSH_Lookup catflap


More information about the varnish-commit mailing list