The lua socket's context referenced the owning appctx. It was set when the
appctx was initialized. It is now performed when the appctx is created. It
is a small change but this will be required to fix several issues with the
lua sockets.
static int hlua_socket_init(struct appctx *appctx)
{
- struct hlua_csk_ctx *ctx = appctx->svcctx;
struct stream *s;
if (appctx_finalize_startup(appctx, socket_proxy, &BUF_NULL) == -1)
s->flags |= SF_DIRECT | SF_ASSIGNED | SF_BE_ASSIGNED;
s->target = &socket_tcp->obj_type;
- ctx->appctx = appctx;
return 0;
error:
ctx = applet_reserve_svcctx(appctx, sizeof(*ctx));
ctx->connected = 0;
ctx->die = 0;
+ ctx->appctx = appctx;
LIST_INIT(&ctx->wake_on_write);
LIST_INIT(&ctx->wake_on_read);