From: Amaury Denoyelle Date: Thu, 22 May 2025 15:13:20 +0000 (+0200) Subject: MINOR: server: use stress mode for "add server help" X-Git-Tag: v3.2.0~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e088e3f8ec2a93b33b4e412530b4321f16bd8de;p=thirdparty%2Fhaproxy.git MINOR: server: use stress mode for "add server help" Implement stress mode on "add server help". This ensures that the command is fully reentrant on full output buffer. For testing, it requires compilation with USE_STRESS and global setting "stress-level 1". --- diff --git a/src/server.c b/src/server.c index afe228043..26cb50ebe 100644 --- a/src/server.c +++ b/src/server.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -5855,8 +5856,10 @@ int cli_io_handler_add_server(struct appctx *appctx) ctx->obj2 = kw; chunk_reset(&trash); chunk_printf(&trash, "%s\n", kw->kw); - if (applet_putchk(appctx, &trash) == -1) + if (STRESS_RUN1(applet_putchk_stress(appctx, &trash) == -1, + applet_putchk(appctx, &trash) == -1)) { goto full; + } } kwl = LIST_NEXT(&kwl->list, struct srv_kw_list *, list);