Changeset 139fc3d


Ignore:
Timestamp:
2009-12-14 13:10:15 (4 years ago)
Author:
Poul-Henning Kamp <phk@…>
Branches:
2.1, tags/varnish-2.1.0, tags/varnish-2.1.1, tags/varnish-2.1.2, tags/varnish-2.1.3, tags/varnish-2.1.4
Children:
bd02727
Parents:
7b9f69
git-author:
Poul-Henning Kamp <phk@…> (2009-12-14 13:10:15)
git-committer:
Poul-Henning Kamp <phk@…> (2009-12-14 13:10:15)
Message:

Eliminate the vrt_dir_simple structure, it is not really needed.

git-svn-id:  http://www.varnish-cache.org/svn/trunk@4391 d4fa192b-c00b-0410-8231-f00ffab90ce4

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • bin/varnishd/cache_dir_simple.c

    reafcc6 r139fc3d  
    9696void 
    9797VRT_init_dir_simple(struct cli *cli, struct director **bp, 
    98     const struct vrt_dir_simple *t) 
     98    const struct vrt_backend *t) 
    9999{ 
    100100        struct vdi_simple *vs; 
     
    107107        vs->dir.priv = vs; 
    108108        vs->dir.name = "simple"; 
    109         REPLACE(vs->dir.vcl_name, t->host->vcl_name); 
     109        REPLACE(vs->dir.vcl_name, t->vcl_name); 
    110110        vs->dir.getfd = vdi_simple_getfd; 
    111111        vs->dir.fini = vdi_simple_fini; 
    112112        vs->dir.healthy = vdi_simple_healthy; 
    113113 
    114         vs->backend = VBE_AddBackend(cli, t->host); 
     114        vs->backend = VBE_AddBackend(cli, t); 
    115115 
    116116        *bp = &vs->dir; 
  • include/vrt.h

    r3f61c7 r139fc3d  
    7777        unsigned                        saintmode_threshold; 
    7878        struct vrt_backend_probe        probe; 
    79 }; 
    80  
    81 /* 
    82  * A director with a predictable reply 
    83  */ 
    84  
    85 struct vrt_dir_simple { 
    86         const char                              *name; 
    87         const struct vrt_backend                *host; 
    8879}; 
    8980 
     
    172163/* Backend related */ 
    173164void VRT_init_dir_simple(struct cli *, struct director **, 
    174     const struct vrt_dir_simple *); 
     165    const struct vrt_backend *); 
    175166void VRT_init_dir_random(struct cli *, struct director **, 
    176167    const struct vrt_dir_random *); 
  • lib/libvcl/vcc_backend.c

    r7b9f69 r139fc3d  
    748748 
    749749        Fi(tl, 0, 
    750             "\tVRT_init_dir_simple(cli, &VGC_backend_%.*s , &sbe_%.*s);\n", 
    751             PF(h->name), PF(h->name)); 
     750            "\tVRT_init_dir_simple(cli, &VGC_backend_%.*s , &bh_%d);\n", 
     751            PF(h->name), h->hnum); 
    752752        Ff(tl, 0, "\tVRT_fini_dir(cli, VGC_backend_%.*s);\n", PF(h->name)); 
    753  
    754         Fh(tl, 0, "\nstatic const struct vrt_dir_simple sbe_%.*s = {\n", 
    755             PF(h->name)); 
    756         Fh(tl, 0, "\t.name = \"%.*s\",\n", PF(h->name)); 
    757         Fh(tl, 0, "\t.host = &bh_%d,\n", h->hnum); 
    758         Fh(tl, 0, "};\n"); 
    759753 
    760754} 
  • lib/libvcl/vcc_fixed_token.c

    rcb257d r139fc3d  
    11/* 
    2  * $Id: vcc_gen_fixed_token.tcl 4358 2009-11-19 19:03:25Z phk $ 
     2 * $Id: vcc_gen_fixed_token.tcl 4376 2009-11-27 11:06:32Z phk $ 
    33 * 
    44 * NB:  This file is machine generated, DO NOT EDIT! 
     
    160160        /* ../../include/vcl.h */ 
    161161 
    162         vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4358 2009-11-19 19"); 
    163         vsb_cat(sb, ":03:25Z phk $\n *\n * NB:  This file is machine genera"); 
     162        vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4376 2009-11-27 11"); 
     163        vsb_cat(sb, ":06:32Z phk $\n *\n * NB:  This file is machine genera"); 
    164164        vsb_cat(sb, "ted, DO NOT EDIT!\n *\n * Edit and run vcc_gen_fixed_t"); 
    165165        vsb_cat(sb, "oken.tcl instead\n */\n\nstruct sess;\n"); 
     
    254254        vsb_cat(sb, "\tunsigned\t\t\tsaintmode_threshold;\n"); 
    255255        vsb_cat(sb, "\tstruct vrt_backend_probe\tprobe;\n"); 
    256         vsb_cat(sb, "};\n\n/*\n * A director with a predictable reply\n"); 
    257         vsb_cat(sb, " */\n\nstruct vrt_dir_simple {\n"); 
    258         vsb_cat(sb, "\tconst char\t\t\t\t*name;\n\tconst struct vrt_backend"); 
    259         vsb_cat(sb, "\t\t*host;\n};\n\n/*\n * A director with an unpredicta"); 
    260         vsb_cat(sb, "ble reply\n */\n\nstruct vrt_dir_random_entry {\n"); 
     256        vsb_cat(sb, "};\n\n/*\n * A director with an unpredictable reply\n"); 
     257        vsb_cat(sb, " */\n\nstruct vrt_dir_random_entry {\n"); 
    261258        vsb_cat(sb, "\tconst struct vrt_backend\t\t*host;\n"); 
    262259        vsb_cat(sb, "\tdouble\t\t\t\t\tweight;\n};\n"); 
     
    303300        vsb_cat(sb, "\n/* Backend related */\nvoid VRT_init_dir_simple(stru"); 
    304301        vsb_cat(sb, "ct cli *, struct director **,\n"); 
    305         vsb_cat(sb, "    const struct vrt_dir_simple *);\n"); 
     302        vsb_cat(sb, "    const struct vrt_backend *);\n"); 
    306303        vsb_cat(sb, "void VRT_init_dir_random(struct cli *, struct director"); 
    307304        vsb_cat(sb, " **,\n    const struct vrt_dir_random *);\n"); 
     
    319316        /* ../../include/vrt_obj.h */ 
    320317 
    321         vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4358 2009-11-19 19"); 
    322         vsb_cat(sb, ":03:25Z phk $\n *\n * NB:  This file is machine genera"); 
     318        vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4376 2009-11-27 11"); 
     319        vsb_cat(sb, ":06:32Z phk $\n *\n * NB:  This file is machine genera"); 
    323320        vsb_cat(sb, "ted, DO NOT EDIT!\n *\n * Edit and run vcc_gen_fixed_t"); 
    324321        vsb_cat(sb, "oken.tcl instead\n */\n\nstruct sockaddr * VRT_r_clien"); 
  • lib/libvcl/vcc_obj.c

    rcb257d r139fc3d  
    11/* 
    2  * $Id: vcc_gen_fixed_token.tcl 4358 2009-11-19 19:03:25Z phk $ 
     2 * $Id: vcc_gen_fixed_token.tcl 4376 2009-11-27 11:06:32Z phk $ 
    33 * 
    44 * NB:  This file is machine generated, DO NOT EDIT! 
Note: See TracChangeset for help on using the changeset viewer.