]> err.no Git - varnish/commitdiff
I forgot to include the vcl_name of the random director in the structure.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Feb 2008 09:43:22 +0000 (09:43 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 6 Feb 2008 09:43:22 +0000 (09:43 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2435 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/include/vrt.h
varnish-cache/lib/libvcl/vcc_backend.c
varnish-cache/lib/libvcl/vcc_fixed_token.c

index 45c8b83d9fa2abfc3121e271ae8e480544e71f7e..1c6e06f4b8a9768fad256f98e9896fc6329e5b1c 100644 (file)
@@ -71,9 +71,10 @@ struct vrt_dir_random_entry {
 };
 
 struct vrt_dir_random {
+       const char                      *ident;
+       const char                      *name;
        unsigned                        nmember;
        const struct vrt_dir_random_entry       *members;
-       const char                      *ident;
 };
 
 struct vrt_random_backend {
index c0253dd4608fbb7268774bbccc664cec5de67cc9..49f2a61304d1b9ff6a62bbbb6d3eb2062ae1ff6f 100644 (file)
@@ -425,6 +425,7 @@ vcc_ParseRandomDirector(struct tokenlist *tl, const struct token *t_first, struc
        Fc(tl, 0,
            "\nstatic const struct vrt_dir_random vdr_%.*s = {\n",
            PF(t_dir));
+       Fc(tl, 0, "\t.name = \"%.*s\",\n", PF(t_dir));
        Fc(tl, 0, "\t.nmember = %d,\n", nelem);
        Fc(tl, 0, "\t.members = vdre_%.*s,\n", PF(t_dir));
        vcc_EmitBeIdent(tl->fc, t_first, tl->t);
index 8fd186ccea3e5cebaaad73618e20a071317dec2b..65ab9e21ed7dd75f08e84368224b220c47ef3b4e 100644 (file)
@@ -423,9 +423,10 @@ vcl_output_lang_h(struct vsb *sb)
        vsb_cat(sb, "};\n");
        vsb_cat(sb, "\n");
        vsb_cat(sb, "struct vrt_dir_random {\n");
+       vsb_cat(sb, "   const char                      *ident;\n");
+       vsb_cat(sb, "   const char                      *name;\n");
        vsb_cat(sb, "   unsigned                        nmember;\n");
        vsb_cat(sb, "   const struct vrt_dir_random_entry       *members;\n");
-       vsb_cat(sb, "   const char                      *ident;\n");
        vsb_cat(sb, "};\n");
        vsb_cat(sb, "\n");
        vsb_cat(sb, "struct vrt_random_backend {\n");