]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: applet: mark the appctx's st2 variable as deprecated
authorWilly Tarreau <w@1wt.eu>
Thu, 5 May 2022 18:01:54 +0000 (20:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 6 May 2022 16:13:36 +0000 (18:13 +0200)
commitc7afedc140c86eae9151bf7554c69331424ac8bd
tree41864000a3f86a72b873985b5c0b64a418a687dd
parentf50da2c32017a59ef40f96fdcb50f8a9e8d8be44
BUILD: applet: mark the appctx's st2 variable as deprecated

This one has been misused for a while as well, it's time to deprecate it
since we don't use it anymore. It will be removed in 2.7 and for now is
only marked as deprecated. Since we need to guarantee that it's zeroed
before starting any applet or CLI command, it was moved into an anonymous
union where its sibling is not marked as deprecated so that we can
continue to initialize it without triggering a warning.

If you found this commit after a bisect session you initiated to figure
why you got some build warnings and don't know what to do, have a look
at the code that deals with the "show fd", "show sess" or "show servers"
commands, as it's supposed to be self-explanatory about the tiny changes
to apply to your code to port it. If you find APPLET_MAX_SVCCTX to be
too small for your use case, either kindly ask for a tiny extension
(and try to get your code merged), or just use a pool.
include/haproxy/applet-t.h
src/cli.c
src/stream.c