mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-28 16:40:37 +00:00
MINOR: lua: export applet and task handlers
The current functions are seen outside from the debugging code and are convenient to export so that we can improve the thread dump output : void hlua_applet_tcp_fct(struct appctx *ctx); void hlua_applet_http_fct(struct appctx *ctx); struct task *hlua_process_task(struct task *task, void *context, unsigned short state); Of course they are only available when USE_LUA is defined.
This commit is contained in:
parent
a2c9911ace
commit
60409db0b1
@ -27,6 +27,9 @@
|
|||||||
void hlua_ctx_destroy(struct hlua *lua);
|
void hlua_ctx_destroy(struct hlua *lua);
|
||||||
void hlua_init();
|
void hlua_init();
|
||||||
int hlua_post_init();
|
int hlua_post_init();
|
||||||
|
void hlua_applet_tcp_fct(struct appctx *ctx);
|
||||||
|
void hlua_applet_http_fct(struct appctx *ctx);
|
||||||
|
struct task *hlua_process_task(struct task *task, void *context, unsigned short state);
|
||||||
|
|
||||||
#else /* USE_LUA */
|
#else /* USE_LUA */
|
||||||
|
|
||||||
|
@ -5596,7 +5596,7 @@ __LJMP static int hlua_set_nice(lua_State *L)
|
|||||||
* Task wrapper are longjmp safe because the only one Lua code
|
* Task wrapper are longjmp safe because the only one Lua code
|
||||||
* executed is the safe hlua_ctx_resume();
|
* executed is the safe hlua_ctx_resume();
|
||||||
*/
|
*/
|
||||||
static struct task *hlua_process_task(struct task *task, void *context, unsigned short state)
|
struct task *hlua_process_task(struct task *task, void *context, unsigned short state)
|
||||||
{
|
{
|
||||||
struct hlua *hlua = context;
|
struct hlua *hlua = context;
|
||||||
enum hlua_exec status;
|
enum hlua_exec status;
|
||||||
@ -6404,7 +6404,7 @@ static int hlua_applet_tcp_init(struct appctx *ctx, struct proxy *px, struct str
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hlua_applet_tcp_fct(struct appctx *ctx)
|
void hlua_applet_tcp_fct(struct appctx *ctx)
|
||||||
{
|
{
|
||||||
struct stream_interface *si = ctx->owner;
|
struct stream_interface *si = ctx->owner;
|
||||||
struct stream *strm = si_strm(si);
|
struct stream *strm = si_strm(si);
|
||||||
@ -6596,7 +6596,7 @@ static int hlua_applet_http_init(struct appctx *ctx, struct proxy *px, struct st
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hlua_applet_http_fct(struct appctx *ctx)
|
void hlua_applet_http_fct(struct appctx *ctx)
|
||||||
{
|
{
|
||||||
struct stream_interface *si = ctx->owner;
|
struct stream_interface *si = ctx->owner;
|
||||||
struct stream *strm = si_strm(si);
|
struct stream *strm = si_strm(si);
|
||||||
|
Loading…
Reference in New Issue
Block a user