[master] 0dd8c0b Fix: wrap the vxid on VSL_IDENTMASK

Nils Goroll nils.goroll at uplex.de
Sun Jul 12 23:57:15 CEST 2015


commit 0dd8c0b864a9574df0f2891824b4581d0e846613
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Sun Jul 12 23:51:29 2015 +0200

    Fix: wrap the vxid on VSL_IDENTMASK
    
    WHOA - sorry

diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 22d3870..e47f685 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -129,7 +129,7 @@ VXID_Get(struct worker *wrk, uint32_t mask)
 			Lck_Lock(&vxid_lock);
 			v->next = vxid_base;
 			v->count = vxid_chunk;
-			vxid_base = (vxid_base + v->count) && VSL_IDENTMASK;
+			vxid_base = (vxid_base + v->count) & VSL_IDENTMASK;
 			Lck_Unlock(&vxid_lock);
 		}
 		v->count--;



More information about the varnish-commit mailing list