From 715e4e8fb06e8b6fc19290605d64eca41e87860a Mon Sep 17 00:00:00 2001 From: des Date: Thu, 3 May 2007 08:41:01 +0000 Subject: [PATCH] s/expl/reason/ to circumvent a bug in gcc 3. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1377 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache.h | 2 +- varnish-cache/bin/varnishd/cache_response.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index 4f58bbd6..fa46eeac 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -428,7 +428,7 @@ void WSL_Flush(struct worker *w); #endif /* cache_response.c */ -void RES_Error(struct sess *sp, int code, const char *expl); +void RES_Error(struct sess *sp, int code, const char *reason); void RES_WriteObj(struct sess *sp); /* cache_vcl.c */ diff --git a/varnish-cache/bin/varnishd/cache_response.c b/varnish-cache/bin/varnishd/cache_response.c index dcf56c45..33243a16 100644 --- a/varnish-cache/bin/varnishd/cache_response.c +++ b/varnish-cache/bin/varnishd/cache_response.c @@ -48,7 +48,7 @@ static struct http_msg { unsigned nbr; const char *txt; - const char *expl; + const char *reason; } http_msg[] = { { 101, "Switching Protocols" }, { 200, "OK" }, @@ -96,7 +96,7 @@ static struct http_msg { /*--------------------------------------------------------------------*/ void -RES_Error(struct sess *sp, int code, const char *expl) +RES_Error(struct sess *sp, int code, const char *reason) { char buf[40]; struct vsb *sb; @@ -115,13 +115,13 @@ RES_Error(struct sess *sp, int code, const char *expl) if (mp->nbr > code) break; msg = mp->txt; - if (expl == NULL) - expl = mp->expl; + if (reason == NULL) + reason = mp->reason; break; } - if (expl == NULL) - expl = msg; - AN(expl); + if (reason == NULL) + reason = msg; + AN(reason); AN(msg); sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); @@ -144,8 +144,8 @@ RES_Error(struct sess *sp, int code, const char *expl) " \r\n" " \r\n"); vsb_printf(sb, "

Error %03d %s

\r\n", code, msg); - vsb_printf(sb, "

%s

\r\n", expl); - vsb_printf(sb, "

Guru Meditation:

\r\n", expl); + vsb_printf(sb, "

%s

\r\n", reason); + vsb_printf(sb, "

Guru Meditation:

\r\n", reason); vsb_printf(sb, "

XID: %u

\r\n", sp->xid); vsb_cat(sb, " Varnish\r\n" @@ -158,7 +158,7 @@ RES_Error(struct sess *sp, int code, const char *expl) WSL(sp->wrk, SLT_TxStatus, sp->id, "%d", code); WSL(sp->wrk, SLT_TxProtocol, sp->id, "HTTP/1.1"); WSL(sp->wrk, SLT_TxResponse, sp->id, msg); - vca_close_session(sp, expl); + vca_close_session(sp, reason); vsb_delete(sb); } -- 2.39.5