From 52d1bade5bdea912305cc2a1ffccac2964fd4154 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 6 Feb 2008 09:43:22 +0000 Subject: [PATCH] I forgot to include the vcl_name of the random director in the structure. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2435 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/include/vrt.h | 3 ++- varnish-cache/lib/libvcl/vcc_backend.c | 1 + varnish-cache/lib/libvcl/vcc_fixed_token.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/varnish-cache/include/vrt.h b/varnish-cache/include/vrt.h index 45c8b83d..1c6e06f4 100644 --- a/varnish-cache/include/vrt.h +++ b/varnish-cache/include/vrt.h @@ -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 { diff --git a/varnish-cache/lib/libvcl/vcc_backend.c b/varnish-cache/lib/libvcl/vcc_backend.c index c0253dd4..49f2a613 100644 --- a/varnish-cache/lib/libvcl/vcc_backend.c +++ b/varnish-cache/lib/libvcl/vcc_backend.c @@ -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); diff --git a/varnish-cache/lib/libvcl/vcc_fixed_token.c b/varnish-cache/lib/libvcl/vcc_fixed_token.c index 8fd186cc..65ab9e21 100644 --- a/varnish-cache/lib/libvcl/vcc_fixed_token.c +++ b/varnish-cache/lib/libvcl/vcc_fixed_token.c @@ -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"); -- 2.39.5