]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: applet: add a new "owner" pointer in the appctx
authorWilly Tarreau <w@1wt.eu>
Mon, 13 Apr 2015 09:48:16 +0000 (11:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Apr 2015 15:56:16 +0000 (17:56 +0200)
This pointer indicates what stream-interface the appctx belongs to, just
like we have for the connections.

include/proto/stream_interface.h
include/types/stream_interface.h

index 39a4f9ef59057b12252530e620a87b08396390f7..5462131f1363cd9a2ae14433eb6f00f48218e7f5 100644 (file)
@@ -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 */
index 7436efd754ab3ed137fd0e6c75d04435d53e876a..72835faad172f8a8caad5f9e3d8692fd7742fa01 100644 (file)
@@ -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 {