{
struct hlua_appctx *appctx = MAY_LJMP(hlua_checkapplet_tcp(L, 1));
struct stream *s = appctx->htxn.s;
- struct hlua *hlua = &s->hlua;
+ struct hlua *hlua;
+
+ /* Note that this hlua struct is from the session and not from the applet. */
+ hlua = &s->hlua;
MAY_LJMP(check_args(L, 2, "set_priv"));
{
struct hlua_appctx *appctx = MAY_LJMP(hlua_checkapplet_tcp(L, 1));
struct stream *s = appctx->htxn.s;
- struct hlua *hlua = &s->hlua;
+ struct hlua *hlua;
+
+ /* Note that this hlua struct is from the session and not from the applet. */
+ hlua = &s->hlua;
/* Push configuration index in the stack. */
lua_rawgeti(L, LUA_REGISTRYINDEX, hlua->Mref);
{
struct hlua_appctx *appctx = MAY_LJMP(hlua_checkapplet_http(L, 1));
struct stream *s = appctx->htxn.s;
- struct hlua *hlua = &s->hlua;
+ struct hlua *hlua;
+
+ /* Note that this hlua struct is from the session and not from the applet. */
+ hlua = &s->hlua;
MAY_LJMP(check_args(L, 2, "set_priv"));
{
struct hlua_appctx *appctx = MAY_LJMP(hlua_checkapplet_http(L, 1));
struct stream *s = appctx->htxn.s;
- struct hlua *hlua = &s->hlua;
+ struct hlua *hlua;
+
+ /* Note that this hlua struct is from the session and not from the applet. */
+ hlua = &s->hlua;
/* Push configuration index in the stack. */
lua_rawgeti(L, LUA_REGISTRYINDEX, hlua->Mref);
/* Once the arguments parsed, the CLI is like an AppletTCP,
* so push AppletTCP in the stack.
- * TODO: get_priv() and set_priv() are useless. Maybe we will
- * create a new object without these two functions.
*/
if (!hlua_applet_tcp_new(hlua->T, appctx)) {
SEND_ERR(NULL, "Lua cli '%s': full stack.\n", fcn->name);