[5.2] 9b08d11 Remove blob operations from vmod-debug

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Fri Sep 15 11:17:14 UTC 2017


commit 9b08d1123d7de2de7cd63334cf67b6d9ed05c769
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Sun Sep 10 19:02:24 2017 +0200

    Remove blob operations from vmod-debug
    
    Missed in 32877991.

diff --git a/lib/libvmod_debug/vmod.vcc b/lib/libvmod_debug/vmod.vcc
index 5a3ce7e..324d389 100644
--- a/lib/libvmod_debug/vmod.vcc
+++ b/lib/libvmod_debug/vmod.vcc
@@ -64,14 +64,6 @@ $Function STRING test_priv_top(PRIV_TOP, STRING)
 
 Test function for TOP private pointers
 
-$Function BLOB str2blob(STRING src="foo")
-
-Turn a string into a blob
-
-$Function STRING blob2hex(BLOB src)
-
-Hexdump a blob
-
 $Function BACKEND no_backend()
 
 Fails at backend selection
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index f4fac46..09312cf 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -151,42 +151,6 @@ vmod_test_priv_vcl(VRT_CTX, struct vmod_priv *priv)
 	assert(!strcmp(priv_vcl->foo, "FOO"));
 }
 
-VCL_BLOB
-vmod_str2blob(VRT_CTX, VCL_STRING s)
-{
-	struct vmod_priv *p;
-
-	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
-	WARN_RETIRED();
-	p = (void*)WS_Alloc(ctx->ws, sizeof *p);
-	AN(p);
-	memset(p, 0, sizeof *p);
-	p->len = strlen(s);
-	p->priv = WS_Copy(ctx->ws, s, -1);
-	return (p);
-}
-
-VCL_STRING
-vmod_blob2hex(VRT_CTX, VCL_BLOB b)
-{
-	char *s, *p;
-	uint8_t *q;
-	int i;
-
-	WARN_RETIRED();
-	s = WS_Alloc(ctx->ws, b->len * 2 + 2);
-	AN(s);
-	p = s;
-	q = b->priv;
-	for (i = 0; i < b->len; i++) {
-		assert(snprintf(p, 3, "%02x", *q) == 2);
-		p += 2;
-		q += 1;
-	}
-	VRT_priv_fini(b);
-	return (s);
-}
-
 VCL_BACKEND
 vmod_no_backend(VRT_CTX)
 {


More information about the varnish-commit mailing list