From 19c8161b3d90c6f135f918d4b3dee3feb24a23bf Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 13 Apr 2015 11:48:16 +0200 Subject: [PATCH] MINOR: applet: add a new "owner" pointer in the appctx This pointer indicates what stream-interface the appctx belongs to, just like we have for the connections. --- include/proto/stream_interface.h | 1 + include/types/stream_interface.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h index 39a4f9ef5..5462131f1 100644 --- a/include/proto/stream_interface.h +++ b/include/proto/stream_interface.h @@ -234,6 +234,7 @@ static inline void si_attach_appctx(struct stream_interface *si, struct appctx * { si->ops = &si_embedded_ops; si->end = &appctx->obj_type; + appctx->owner = si; } /* returns a pointer to the appctx being run in the SI or NULL if none */ diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h index 7436efd75..72835faad 100644 --- a/include/types/stream_interface.h +++ b/include/types/stream_interface.h @@ -129,6 +129,7 @@ struct appctx { unsigned int st1; /* prompt for stats, session error for peers */ unsigned int st2; /* output state for stats, unused by peers */ struct si_applet *applet; /* applet this context refers to */ + void *owner; /* pointer to upper layer's entity (eg: stream interface) */ union { struct {