]> err.no Git - varnish/commitdiff
s/expl/reason/ to circumvent a bug in gcc 3.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 3 May 2007 08:41:01 +0000 (08:41 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 3 May 2007 08:41:01 +0000 (08:41 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1377 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_response.c

index 4f58bbd6d70d12be2eba0d0b12b612ad6c2fbb01..fa46eeac89e09d2d0118bf0a97ad8099eae8d35f 100644 (file)
@@ -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 */
index dcf56c45e3f747297505436fda2273b6f09d26bc..33243a16efbe0966a2f93f0215c9e6fc20109677 100644 (file)
@@ -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)
                "  </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 @@ 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);
 }