[master] ddf99e4 Remove blob operations from vmod-debug

Dridi Boukelmoune dridi at varnish-software.com
Sun Sep 10 21:05:20 UTC 2017


That was left on purpose, we can discuss that tomorrow. There's a pull
request to remove things that overlap with vmod vtc after the 5.2 release,
phk wanted to keep them in despite vmod debug not being installed.

Dridi

On Sep 10, 2017 22:48, "Federico G. Schwindt" <fgsch at lodoss.net> wrote:

>
> commit ddf99e4e8202c7b4831048ed0bfbed1844d46806
> 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)
>  {
> _______________________________________________
> varnish-commit mailing list
> varnish-commit at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-commit/attachments/20170910/3905a6e8/attachment.html>


More information about the varnish-commit mailing list