MEDIUM: lua: move the cosocket storage outside of appctx.ctx
authorWilly Tarreau <w@1wt.eu>
Fri, 6 May 2022 09:57:34 +0000 (11:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 6 May 2022 16:13:36 +0000 (18:13 +0200)
commit5321da9df086c136731c803cd077bc8005a70c70
tree799cf0b8034897185db77832821b212f81037488
parentf61494c7082ebf1bd7c29ab9896f6ebd29fef06a
MEDIUM: lua: move the cosocket storage outside of appctx.ctx

The Lua cosockets were using appctx.ctx.hlua_cosocket. Let's move this
to a local definition of "hlua_csk_ctx" in hlua.c, which is allocated
from the appctx by hlua_socket_new(). There's a notable change which is
that, while previously the xref link with the peer was established with
the appctx, it's now in the hlua_csk_ctx. This one must then hold a
pointer to the appctx. The code was adjusted accordingly, and now that
part of the code doesn't use the appctx.ctx anymore.
include/haproxy/applet-t.h
src/hlua.c