Commit c67af5f5 authored by Nils Goroll's avatar Nils Goroll

disambiguate vcl_max

we used vcl_max both for the max vcl version and the maximum number of
vcls to load.
parent b0af060f
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment