[6.0] 05c168aea Add a VLU_Reset() function

Martin Blix Grydeland martin at varnish-software.com
Fri Oct 18 13:23:06 UTC 2019


commit 05c168aea3181fb0c610c9d88e8801b58198fdd6
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Aug 8 08:24:13 2019 +0000

    Add a VLU_Reset() function

diff --git a/include/vlu.h b/include/vlu.h
index 47cf705f5..8ce98dd3f 100644
--- a/include/vlu.h
+++ b/include/vlu.h
@@ -34,6 +34,7 @@
 
 typedef int (vlu_f)(void *, const char *);
 struct vlu *VLU_New(vlu_f *, void *, unsigned);
+void VLU_Reset(struct vlu *);
 int VLU_Fd(struct vlu *, int);
 void VLU_Destroy(struct vlu **);
 int VLU_File(int, vlu_f *, void *, unsigned);
diff --git a/lib/libvarnish/vlu.c b/lib/libvarnish/vlu.c
index a120c4df6..cdcb6eeee 100644
--- a/lib/libvarnish/vlu.c
+++ b/lib/libvarnish/vlu.c
@@ -72,6 +72,13 @@ VLU_New(vlu_f *func, void *priv, unsigned bufsize)
 	return (l);
 }
 
+void
+VLU_Reset(struct vlu *l)
+{
+	CHECK_OBJ_NOTNULL(l, LINEUP_MAGIC);
+	l->bufp = 0;
+}
+
 void
 VLU_Destroy(struct vlu **lp)
 {


More information about the varnish-commit mailing list