[master] a9b6d0e Make the "debug +vclrel" trick work for all worker threads.

Poul-Henning Kamp phk at FreeBSD.org
Mon Jan 4 21:45:02 CET 2016


commit a9b6d0e8fa1f7edcd9aa8c0fc7b054ce35ecd6fc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jan 4 20:44:19 2016 +0000

    Make the "debug +vclrel" trick work for all worker threads.

diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index f1bb4c0..34c4374 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -321,8 +321,6 @@ SES_Proto_Req(struct worker *wrk, void *arg)
 		WRONG("Wrong session step");
 	}
 	WS_Assert(wrk->aws);
-	if (DO_DEBUG(DBG_VCLREL) && wrk->vcl != NULL)
-		VCL_Rel(&wrk->vcl);
 	THR_SetRequest(NULL);
 }
 
diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index 7b774b1..7176f09 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -339,6 +339,8 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk)
 			memset(&wrk->task, 0, sizeof wrk->task);
 			assert(wrk->pool == pp);
 			tp->func(wrk, tp->priv);
+			if (DO_DEBUG(DBG_VCLREL) && wrk->vcl != NULL)
+				VCL_Rel(&wrk->vcl);
 			tpx = wrk->task;
 			tp = &tpx;
 		} while (tp->func != NULL);



More information about the varnish-commit mailing list