mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-18 17:34:45 +00:00
MINOR: conn-stream/applet: Stop setting appctx as the endpoint context
The appctx is already the endpoint target. It is confusing to also use it to set the endpoint context. So, never set the endpoint ctx when an appctx is created or attached to an existing conn-stream.
This commit is contained in:
parent
34e4085f8a
commit
2d9cc85b74
@ -51,7 +51,6 @@ struct appctx *appctx_new(struct applet *applet, struct cs_endpoint *endp, unsig
|
||||
if (!endp)
|
||||
goto fail_endp;
|
||||
endp->target = appctx;
|
||||
endp->ctx = appctx;
|
||||
endp->flags |= (CS_EP_T_APPLET|CS_EP_ORPHAN);
|
||||
}
|
||||
appctx->endp = endp;
|
||||
|
@ -276,10 +276,9 @@ int cs_attach_mux(struct conn_stream *cs, void *target, void *ctx)
|
||||
* removed. This function is called by a stream when a backend applet is
|
||||
* registered.
|
||||
*/
|
||||
static void cs_attach_applet(struct conn_stream *cs, void *target, void *ctx)
|
||||
static void cs_attach_applet(struct conn_stream *cs, void *target)
|
||||
{
|
||||
cs->endp->target = target;
|
||||
cs->endp->ctx = ctx;
|
||||
cs->endp->flags |= CS_EP_T_APPLET;
|
||||
cs->endp->flags &= ~CS_EP_DETACHED;
|
||||
if (cs_strm(cs)) {
|
||||
@ -479,7 +478,7 @@ struct appctx *cs_applet_create(struct conn_stream *cs, struct applet *app)
|
||||
appctx = appctx_new_here(app, cs->endp);
|
||||
if (!appctx)
|
||||
return NULL;
|
||||
cs_attach_applet(cs, appctx, appctx);
|
||||
cs_attach_applet(cs, appctx);
|
||||
appctx->t->nice = __cs_strm(cs)->task->nice;
|
||||
cs_cant_get(cs);
|
||||
appctx_wakeup(appctx);
|
||||
|
Loading…
Reference in New Issue
Block a user