]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cli: define usermsgs print context
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 10 Nov 2022 13:24:51 +0000 (14:24 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 10 Nov 2022 15:42:47 +0000 (16:42 +0100)
commit24e9961a8f45d0926212c4541780e27c4f305c0b
tree5066e846e7b9ee727eba0789abe2347abee3e747
parent56f50a03b7f1f996cccd88f661ccbc9438a9d139
MINOR: cli: define usermsgs print context

CLI 'add server' handler relies on usermsgs_ctx to display errors in
internal function on CLI output. This may be also extended to other
handlers.

However, to not clutter stderr from another contextes, usermsgs_ctx must
be resetted when it is not needed anymore. This operation cannot be
conducted in the CLI parse handler as display is conducted after it.

To achieve this, define new CLI states CLI_ST_PRINT_UMSG /
CLI_ST_PRINT_UMSGERR. Their principles is nearly identical to states for
dynamic messages printing.
include/haproxy/cli-t.h
include/haproxy/cli.h
src/cli.c