]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: applet: use applet_put*() everywhere possible
authorWilly Tarreau <w@1wt.eu>
Wed, 18 May 2022 13:07:19 +0000 (15:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 17:33:34 +0000 (19:33 +0200)
commitd0a06d52f48e06c77f6c279c0932d8093feec692
tree7ee2748b38c4d265c290e9b9afec65a4769730ff
parent15c25d5e1dbf81b19dac3e89a123b2b11c0dd69c
CLEANUP: applet: use applet_put*() everywhere possible

This applies the change so that the applet code stops using ci_putchk()
and friends everywhere possible, for the much saferapplet_put*() instead.
The change is mechanical but large. Two or three functions used to have no
appctx and a cs derived from the appctx instead, which was a reminiscence
of old times' stream_interface. These were simply changed to directly take
the appctx. No sensitive change was performed, and the old (more complex)
API is still usable when needed (e.g. the channel is already known).

The change touched roughly a hundred of locations, with no less than 124
lines removed.

It's worth noting that the stats applet, the oldest of the series, could
get a serious lifting, as it's still very channel-centric instead of
propagating the appctx along the chain. Given that this code doesn't
change often, there's no emergency to clean it up but it would look
better.
22 files changed:
src/activity.c
src/cache.c
src/cli.c
src/debug.c
src/dns.c
src/flt_spoe.c
src/http_client.c
src/map.c
src/mworker.c
src/peers.c
src/pool.c
src/proxy.c
src/resolvers.c
src/ring.c
src/server.c
src/sink.c
src/ssl_ckch.c
src/ssl_crtlist.c
src/ssl_sock.c
src/stats.c
src/stick_table.c
src/stream.c