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) ...@@ -430,7 +430,8 @@ VCL_Open(const char *fn, struct vsb *msg)
(void)dlclose(dlh); (void)dlclose(dlh);
return (NULL); 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", VSB_printf(msg, "Compiled VCL version (%.1f) not supported.\n",
.1 * cnf->syntax); .1 * cnf->syntax);
(void)dlclose(dlh); (void)dlclose(dlh);
......
...@@ -87,8 +87,8 @@ struct heritage { ...@@ -87,8 +87,8 @@ struct heritage {
struct vsmw *proc_vsmw; struct vsmw *proc_vsmw;
unsigned min_vcl; unsigned min_vcl_version;
unsigned max_vcl; unsigned max_vcl_version;
}; };
extern struct heritage heritage; extern struct heritage heritage;
......
...@@ -269,8 +269,8 @@ MAC_Arg(const char *spec) ...@@ -269,8 +269,8 @@ MAC_Arg(const char *spec)
ARGV_ERR("Unix domain socket addresses must be" ARGV_ERR("Unix domain socket addresses must be"
" absolute paths in -a (%s)\n", la->endpoint); " absolute paths in -a (%s)\n", la->endpoint);
if (*la->endpoint == '/' && heritage.min_vcl < 41) if (*la->endpoint == '/' && heritage.min_vcl_version < 41)
heritage.min_vcl = 41; heritage.min_vcl_version = 41;
for (int i = 2; av[i] != NULL; i++) { for (int i = 2; av[i] != NULL; i++) {
char *eq, *val; char *eq, *val;
......
...@@ -286,7 +286,7 @@ mgt_initialize(struct cli *cli) ...@@ -286,7 +286,7 @@ mgt_initialize(struct cli *cli)
MCF_InitParams(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); 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