Mailing List Archive

r1377 - trunk/varnish-cache/bin/varnishd
Author: des
Date: 2007-05-03 10:41:01 +0200 (Thu, 03 May 2007)
New Revision: 1377

Modified:
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/cache_response.c
Log:
s/expl/reason/ to circumvent a bug in gcc 3.


Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2007-05-02 14:37:42 UTC (rev 1376)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2007-05-03 08:41:01 UTC (rev 1377)
@@ -428,7 +428,7 @@
#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 */

Modified: trunk/varnish-cache/bin/varnishd/cache_response.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-02 14:37:42 UTC (rev 1376)
+++ trunk/varnish-cache/bin/varnishd/cache_response.c 2007-05-03 08:41:01 UTC (rev 1377)
@@ -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 @@
/*--------------------------------------------------------------------*/

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 @@
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 @@
" </HEAD>\r\n"
" <BODY>\r\n");
vsb_printf(sb, " <H1>Error %03d %s</H1>\r\n", code, msg);
- vsb_printf(sb, " <P>%s</P>\r\n", expl);
- vsb_printf(sb, " <H3>Guru Meditation:</H3>\r\n", expl);
+ vsb_printf(sb, " <P>%s</P>\r\n", reason);
+ vsb_printf(sb, " <H3>Guru Meditation:</H3>\r\n", reason);
vsb_printf(sb, " <P>XID: %u</P>\r\n", sp->xid);
vsb_cat(sb,
" <I><A href=\"http://www.varnish-cache.org/\">Varnish</A></I>\r\n"
@@ -158,7 +158,7 @@
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);
}