r2950 - trunk/varnish-cache/bin/varnishd

petter at projects.linpro.no petter at projects.linpro.no
Fri Jul 18 09:16:46 CEST 2008


Author: petter
Date: 2008-07-18 09:16:45 +0200 (Fri, 18 Jul 2008)
New Revision: 2950

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishd/cache_synthetic.c
Log:
There was no need to send the err_ttl as parameter as SYN_ErrorPage had access to the it directly.


Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2008-07-18 07:01:42 UTC (rev 2949)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2008-07-18 07:16:45 UTC (rev 2950)
@@ -567,7 +567,7 @@
 void RES_WriteObj(struct sess *sp);
 
 /* cache_synthetic.c */
-void SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl);
+void SYN_ErrorPage(struct sess *sp, int status, const char *reason);
 
 /* cache_vary.c */
 void VRY_Create(const struct sess *sp);

Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2008-07-18 07:01:42 UTC (rev 2949)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2008-07-18 07:16:45 UTC (rev 2950)
@@ -309,7 +309,7 @@
 {
 
 	AZ(sp->obj);
-	SYN_ErrorPage(sp, sp->err_code, sp->err_reason, params->err_ttl);
+	SYN_ErrorPage(sp, sp->err_code, sp->err_reason);
 	sp->err_code = 0;
 	sp->err_reason = NULL;
 	sp->step = STP_DONE;
@@ -878,7 +878,7 @@
 	*sp->http0 = *sp->http;
 
 	if (done != 0) {
-		SYN_ErrorPage(sp, done, NULL, params->err_ttl);		/* XXX: STP_ERROR ? */
+		SYN_ErrorPage(sp, done, NULL);		/* XXX: STP_ERROR ? */
 		sp->step = STP_DONE;
 		return (0);
 	}

Modified: trunk/varnish-cache/bin/varnishd/cache_synthetic.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_synthetic.c	2008-07-18 07:01:42 UTC (rev 2949)
+++ trunk/varnish-cache/bin/varnishd/cache_synthetic.c	2008-07-18 07:16:45 UTC (rev 2950)
@@ -47,7 +47,7 @@
  */
 
 void
-SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl)
+SYN_ErrorPage(struct sess *sp, int status, const char *reason)
 {
 	struct http *h;
 	struct worker *w;
@@ -86,7 +86,7 @@
 	TIM_format(now, date);
 	http_PrintfHeader(w, fd, h, "Date: %s", date);
 	http_PrintfHeader(w, fd, h, "Server: Varnish");
-	http_PrintfHeader(w, fd, h, "Retry-After: %d", ttl);
+	http_PrintfHeader(w, fd, h, "Retry-After: %d", params->err_ttl);
 	http_PrintfHeader(w, fd, h, "Content-Type: text/html; charset=utf-8");
 	http_PrintfHeader(w, sp->fd, sp->http, "X-Varnish: %u", sp->xid);
 	http_PrintfHeader(w, fd, h, "Connection: close");




More information about the varnish-commit mailing list