Mailing List Archive

[6.0] c3ba03ee3 set the cli_limit when the parameter is actually available
commit c3ba03ee3614fa053f4c6f58b1d5bc398eb6c7fe
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Mon Dec 16 14:49:54 2019 +0100

set the cli_limit when the parameter is actually available

it is not before we have parsed parameters

diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index bbb4a425f..8db75e33b 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -353,7 +353,6 @@ mgt_cli_init_cls(void)

mgt_cls = VCLS_New(NULL);
AN(mgt_cls);
- VCLS_SetLimit(mgt_cls, &mgt_param.cli_limit);
VCLS_SetHooks(mgt_cls, mgt_cli_cb_before, mgt_cli_cb_after);
VCLS_AddFunc(mgt_cls, MCF_NOAUTH, cli_auth);
VCLS_AddFunc(mgt_cls, MCF_AUTH, cli_proto);
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 765efd39a..72a378e1d 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -703,6 +703,8 @@ main(int argc, char * const *argv)
VSB_data(cli[0].sb));
}

+ VCLS_SetLimit(mgt_cls, &mgt_param.cli_limit);
+
assert(d_flag == 0 || F_flag == 0);

if (C_flag) {
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit