Commit 15940037 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

s/expl/reason/ to circumvent a bug in gcc 3.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1377 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a4f30d7e
...@@ -428,7 +428,7 @@ void WSL_Flush(struct worker *w); ...@@ -428,7 +428,7 @@ void WSL_Flush(struct worker *w);
#endif #endif
/* cache_response.c */ /* 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); void RES_WriteObj(struct sess *sp);
/* cache_vcl.c */ /* cache_vcl.c */
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
static struct http_msg { static struct http_msg {
unsigned nbr; unsigned nbr;
const char *txt; const char *txt;
const char *expl; const char *reason;
} http_msg[] = { } http_msg[] = {
{ 101, "Switching Protocols" }, { 101, "Switching Protocols" },
{ 200, "OK" }, { 200, "OK" },
...@@ -96,7 +96,7 @@ static struct http_msg { ...@@ -96,7 +96,7 @@ static struct http_msg {
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
void void
RES_Error(struct sess *sp, int code, const char *expl) RES_Error(struct sess *sp, int code, const char *reason)
{ {
char buf[40]; char buf[40];
struct vsb *sb; struct vsb *sb;
...@@ -115,13 +115,13 @@ RES_Error(struct sess *sp, int code, const char *expl) ...@@ -115,13 +115,13 @@ RES_Error(struct sess *sp, int code, const char *expl)
if (mp->nbr > code) if (mp->nbr > code)
break; break;
msg = mp->txt; msg = mp->txt;
if (expl == NULL) if (reason == NULL)
expl = mp->expl; reason = mp->reason;
break; break;
} }
if (expl == NULL) if (reason == NULL)
expl = msg; reason = msg;
AN(expl); AN(reason);
AN(msg); AN(msg);
sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND);
...@@ -144,8 +144,8 @@ RES_Error(struct sess *sp, int code, const char *expl) ...@@ -144,8 +144,8 @@ RES_Error(struct sess *sp, int code, const char *expl)
" </HEAD>\r\n" " </HEAD>\r\n"
" <BODY>\r\n"); " <BODY>\r\n");
vsb_printf(sb, " <H1>Error %03d %s</H1>\r\n", code, msg); vsb_printf(sb, " <H1>Error %03d %s</H1>\r\n", code, msg);
vsb_printf(sb, " <P>%s</P>\r\n", expl); vsb_printf(sb, " <P>%s</P>\r\n", reason);
vsb_printf(sb, " <H3>Guru Meditation:</H3>\r\n", expl); vsb_printf(sb, " <H3>Guru Meditation:</H3>\r\n", reason);
vsb_printf(sb, " <P>XID: %u</P>\r\n", sp->xid); vsb_printf(sb, " <P>XID: %u</P>\r\n", sp->xid);
vsb_cat(sb, vsb_cat(sb,
" <I><A href=\"http://www.varnish-cache.org/\">Varnish</A></I>\r\n" " <I><A href=\"http://www.varnish-cache.org/\">Varnish</A></I>\r\n"
...@@ -158,7 +158,7 @@ RES_Error(struct sess *sp, int code, const char *expl) ...@@ -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_TxStatus, sp->id, "%d", code);
WSL(sp->wrk, SLT_TxProtocol, sp->id, "HTTP/1.1"); WSL(sp->wrk, SLT_TxProtocol, sp->id, "HTTP/1.1");
WSL(sp->wrk, SLT_TxResponse, sp->id, msg); WSL(sp->wrk, SLT_TxResponse, sp->id, msg);
vca_close_session(sp, expl); vca_close_session(sp, reason);
vsb_delete(sb); vsb_delete(sb);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment