[experimental-ims] 0d079cc Reset the "built vary spec" (also) if we came back from the waiting list, otherwise it might turn into garbage.

Geoff Simmons geoff at varnish-cache.org
Mon Jan 9 21:51:44 CET 2012


commit 0d079cc0576fa5bb9c84f34131c61ebb51dcc89c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Sep 1 07:55:46 2011 +0000

    Reset the "built vary spec" (also) if we came back from the waiting
    list, otherwise it might turn into garbage.
    
    Fixes	#994
    Fixes	#1001

diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index df9941c..0f69861 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -1080,10 +1080,12 @@ cnt_lookup(struct sess *sp)
 		AZ(sp->vary_l);
 		AZ(sp->vary_e);
 		(void)WS_Reserve(sp->ws, 0);
-		sp->vary_b = (void*)sp->ws->f;
-		sp->vary_e = (void*)sp->ws->r;
-		sp->vary_b[2] = '\0';
+	} else {
+		AN(sp->ws->r);
 	}
+	sp->vary_b = (void*)sp->ws->f;
+	sp->vary_e = (void*)sp->ws->r;
+	sp->vary_b[2] = '\0';
 
 	oc = HSH_Lookup(sp, &oh);
 



More information about the varnish-commit mailing list