Commit 3c87f32a authored by Nils Goroll's avatar Nils Goroll

for compiling VCLs, truncation is not an error

parent 0bff7aab
......@@ -174,7 +174,7 @@ usage(void)
static void
cli_check(const struct cli *cli)
{
if (cli->result == CLIS_OK) {
if (cli->result == CLIS_OK || cli->result == CLIS_TRUNCATED) {
AZ(VSB_finish(cli->sb));
if (VSB_len(cli->sb) > 0)
fprintf(stderr, "Warnings:\n%s\n", VSB_data(cli->sb));
......@@ -804,7 +804,9 @@ main(int argc, char * const *argv)
fprintf(stderr, "%s\n", VSB_data(cli->sb));
VSB_clear(cli->sb);
}
exit(cli->result == CLIS_OK ? 0 : 2);
if (cli->result == CLIS_OK || cli->result == CLIS_TRUNCATED)
exit(0);
exit(2);
} else {
while (!VTAILQ_EMPTY(&f_args)) {
fa = VTAILQ_FIRST(&f_args);
......
......@@ -458,7 +458,7 @@ mgt_new_vcl(struct cli *cli, const char *vclname, const char *vclsrc,
if (active_vcl == NULL)
active_vcl = vp;
if (cli->result == CLIS_OK &&
if ((cli->result == CLIS_OK || cli->result == CLIS_TRUNCATED) &&
vcl_count > mgt_param.max_vcl &&
mgt_param.max_vcl_handling == 1) {
VCLI_Out(cli, "%d VCLs loaded\n", vcl_count);
......
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