MEDIUM: applet: Set the appctx owner during allocation
The appctx owner is now always a conn-stream. Thus, it can be set during the
appctx allocation. But, to do so, the conn-stream must be created first. It
is not a problem on the server side because the conn-stream is created with
the stream. On the client side, we must take care to create the conn-stream
first.
This change should ease other changes about the applets bootstrapping.
diff --git a/src/stream_interface.c b/src/stream_interface.c
index 703fd37..f8f7794 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -339,7 +339,7 @@
DPRINTF(stderr, "registering handler %p for si %p (was %p)\n", app, si, si_task(si));
- appctx = appctx_new(app);
+ appctx = appctx_new(app, si->cs);
if (!appctx)
return NULL;
cs_attach_endp(si->cs, &appctx->obj_type, appctx);