r5698 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Fri Jan 7 13:32:25 CET 2011


Author: phk
Date: 2011-01-07 13:32:25 +0100 (Fri, 07 Jan 2011)
New Revision: 5698

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishd/cache_pool.c
   trunk/varnish-cache/bin/varnishd/cache_vrt_var.c
Log:
Rename a variable to better reflect what it really is.



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2011-01-06 22:14:54 UTC (rev 5697)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2011-01-07 12:32:25 UTC (rev 5698)
@@ -258,7 +258,8 @@
 	double			grace;
 	unsigned		do_esi;
 
-	char			*storage;
+	/* This is only here so VRT can find it */
+	char			*storage_hint;
 
 	/* Timeouts */
 	double			connect_timeout;

Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2011-01-06 22:14:54 UTC (rev 5697)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2011-01-07 12:32:25 UTC (rev 5698)
@@ -556,7 +556,7 @@
 
 	sp->wrk->body_status = RFC2616_Body(sp);
 
-	AZ(sp->wrk->storage);
+	AZ(sp->wrk->storage_hint);
 
 	VCL_fetch_method(sp);
 
@@ -599,10 +599,11 @@
 	 * XXX: also.
 	 */
 
-	sp->obj = STV_NewObject(sp, sp->wrk->storage, l, sp->wrk->ttl, nhttp);
+	sp->obj = STV_NewObject(sp, sp->wrk->storage_hint, l,
+	    sp->wrk->ttl, nhttp);
 	CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
 
-	sp->wrk->storage = NULL;
+	sp->wrk->storage_hint = NULL;
 
 	if (vary != NULL) {
 		sp->obj->vary =
@@ -1294,7 +1295,7 @@
 		CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
 		CHECK_OBJ_ORNULL(w->nobjhead, OBJHEAD_MAGIC);
 		WS_Assert(w->ws);
-		AZ(sp->wrk->storage);
+		AZ(sp->wrk->storage_hint);
 
 		switch (sp->step) {
 #define STEP(l,u) \

Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c	2011-01-06 22:14:54 UTC (rev 5697)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c	2011-01-07 12:32:25 UTC (rev 5698)
@@ -181,7 +181,7 @@
 		w->beresp1 = NULL;
 		w->beresp = NULL;
 		w->resp = NULL;
-		w->storage = NULL;
+		w->storage_hint = NULL;
 		w->wrq->func(w, w->wrq->priv);
 		AZ(w->bereq);
 		AZ(w->beresp1);
@@ -189,7 +189,7 @@
 		AZ(w->resp);
 		WS_Assert(w->ws);
 		AZ(w->wfd);
-		AZ(w->storage);
+		AZ(w->storage_hint);
 		assert(w->wlp == w->wlb);
 		w->wrq = NULL;
 		if (params->diag_bitmap & 0x00040000) {

Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_var.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt_var.c	2011-01-06 22:14:54 UTC (rev 5697)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt_var.c	2011-01-07 12:32:25 UTC (rev 5698)
@@ -313,8 +313,8 @@
 VRT_r_beresp_storage(struct sess *sp)
 {
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
-	if (sp->wrk->storage != NULL)
-		return (sp->wrk->storage);
+	if (sp->wrk->storage_hint != NULL)
+		return (sp->wrk->storage_hint);
 	else
 		return (NULL);
 }
@@ -328,7 +328,7 @@
 	va_start(ap, str);
 	b = VRT_String(sp->wrk->ws, NULL, str, ap);
 	va_end(ap);
-	sp->wrk->storage = b;
+	sp->wrk->storage_hint = b;
 }
 
 void




More information about the varnish-commit mailing list