[master] f965f4d Forgot to pass the struct wrk* argument to the task function.

Poul-Henning Kamp phk at varnish-cache.org
Mon Jan 23 11:19:03 CET 2012


commit f965f4dfe47ebfbd410e784c0c79e9e84455289b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jan 23 10:18:50 2012 +0000

    Forgot to pass the struct wrk* argument to the task function.

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 463517c..5843fa4 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -288,7 +288,7 @@ struct wrk_accept {
 
 /* Worker pool stuff -------------------------------------------------*/
 
-typedef void pool_func_t(struct pool *pp, void *priv);
+typedef void pool_func_t(struct pool *pp, struct worker *wrk, void *priv);
 
 struct pool_task {
 	VTAILQ_ENTRY(pool_task)		list;
diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c
index cc81b59..8b247fa 100644
--- a/bin/varnishd/cache/cache_pool.c
+++ b/bin/varnishd/cache/cache_pool.c
@@ -257,7 +257,7 @@ Pool_Work_Thread(void *priv, struct worker *wrk)
 
 		if (tp != NULL) {
 			Lck_Unlock(&pp->mtx);
-			tp->func(pp, tp->priv);
+			tp->func(pp, wrk, tp->priv);
 			stats_clean = WRK_TrySumStat(wrk);
 			Lck_Lock(&pp->mtx);
 			continue;



More information about the varnish-commit mailing list