[master] 6155df1 cleanup

Federico Schwindt fgsch at lodoss.net
Fri Nov 3 02:19:40 UTC 2017


ctx->method is not a bit mask. This change makes it look like it is.
Why are we changing this?

On Thu, Nov 2, 2017 at 10:12 PM, Nils Goroll <nils.goroll at uplex.de> wrote:

>
> commit 6155df1eee573bd7325d9155084d40e858530021
> Author: Nils Goroll <nils.goroll at uplex.de>
> Date:   Thu Nov 2 14:10:26 2017 +0100
>
>     cleanup
>
> diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_
> vrt.c
> index 7f95ccb..b975485 100644
> --- a/bin/varnishd/cache/cache_vrt.c
> +++ b/bin/varnishd/cache/cache_vrt.c
> @@ -547,7 +547,7 @@ VRT_purge(VRT_CTX, double ttl, double grace, double
> keep)
>
>         CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
>
> -       if (ctx->method != VCL_MET_HIT && ctx->method != VCL_MET_MISS) {
> +       if ((ctx->method & (VCL_MET_HIT|VCL_MET_MISS)) == 0) {
>                 VSLb(ctx->vsl, SLT_VCL_Error,
>                     "purge can only happen in vcl_hit{} or vcl_miss{}");
>                 VRT_handling(ctx, VCL_RET_FAIL);
> _______________________________________________
> 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/20171103/63172e71/attachment.html>


More information about the varnish-commit mailing list