A session's origin is the entity that was responsible for creating
the session. It can be an applet or a connection for now.
struct session {
struct proxy *fe; /* the proxy this session depends on for the client side */
struct listener *listener; /* the listener by which the request arrived */
+ enum obj_type *origin; /* the connection / applet which initiated this session */
};
#endif /* _TYPES_SESSION_H */
goto out_fail_conn1;
appctx->ctx.hlua.socket = socket;
appctx->ctx.hlua.connected = 0;
+ socket->s->sess->origin = &appctx->obj_type;
+
LIST_INIT(&appctx->ctx.hlua.wake_on_write);
LIST_INIT(&appctx->ctx.hlua.wake_on_read);
goto out_fail_conn1;
appctx->st0 = PEER_SESS_ST_CONNECT;
appctx->ctx.peers.ptr = (void *)ps;
+ s->sess->origin = &appctx->obj_type;
si_reset(&s->si[1]);
s->sess->listener = l;
s->sess->fe = p;
+ s->sess->origin = &cli_conn->obj_type;
s->si[0].flags = SI_FL_NONE;
s->si[1].flags = SI_FL_ISBACK;