Skip to content
Permalink
Browse files

disambiguate vcl_max

we used vcl_max both for the max vcl version and the maximum number of
vcls to load.
  • Loading branch information
nigoroll committed Feb 13, 2020
1 parent b0af060 commit c67af5f5f8bb4cf95df14d7d0eb62f73955bdc7c
@@ -430,7 +430,8 @@ VCL_Open(const char *fn, struct vsb *msg)
(void)dlclose(dlh);
return (NULL);
}
if (cnf->syntax < heritage.min_vcl || cnf->syntax > heritage.max_vcl) {
if (cnf->syntax < heritage.min_vcl_version ||
cnf->syntax > heritage.max_vcl_version) {
VSB_printf(msg, "Compiled VCL version (%.1f) not supported.\n",
.1 * cnf->syntax);
(void)dlclose(dlh);
@@ -87,8 +87,8 @@ struct heritage {

struct vsmw *proc_vsmw;

unsigned min_vcl;
unsigned max_vcl;
unsigned min_vcl_version;
unsigned max_vcl_version;
};

extern struct heritage heritage;
@@ -269,8 +269,8 @@ MAC_Arg(const char *spec)
ARGV_ERR("Unix domain socket addresses must be"
" absolute paths in -a (%s)\n", la->endpoint);

if (*la->endpoint == '/' && heritage.min_vcl < 41)
heritage.min_vcl = 41;
if (*la->endpoint == '/' && heritage.min_vcl_version < 41)
heritage.min_vcl_version = 41;

for (int i = 2; av[i] != NULL; i++) {
char *eq, *val;
@@ -286,7 +286,7 @@ mgt_initialize(struct cli *cli)

MCF_InitParams(cli);

VCC_VCL_Range(&heritage.min_vcl, &heritage.max_vcl);
VCC_VCL_Range(&heritage.min_vcl_version, &heritage.max_vcl_version);

cli_check(cli);
}

0 comments on commit c67af5f

Please sign in to comment.
You can’t perform that action at this time.