From 318cae1f7fa55cdd2a4ce042ec07b0f4e28d8ede Mon Sep 17 00:00:00 2001 From: petter Date: Fri, 18 Jul 2008 07:16:45 +0000 Subject: [PATCH] There was no need to send the err_ttl as parameter as SYN_ErrorPage had access to the it directly. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2950 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache.h | 2 +- varnish-cache/bin/varnishd/cache_center.c | 4 ++-- varnish-cache/bin/varnishd/cache_synthetic.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index 637f47d7..77d89d15 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -567,7 +567,7 @@ void RES_BuildHttp(struct sess *sp); 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); diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index da05126c..61d76333 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -309,7 +309,7 @@ cnt_error(struct sess *sp) { 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 @@ cnt_start(struct sess *sp) *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); } diff --git a/varnish-cache/bin/varnishd/cache_synthetic.c b/varnish-cache/bin/varnishd/cache_synthetic.c index 8c0b4171..91c13fee 100644 --- a/varnish-cache/bin/varnishd/cache_synthetic.c +++ b/varnish-cache/bin/varnishd/cache_synthetic.c @@ -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 @@ SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl) 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"); -- 2.39.5