diff --git a/include/haproxy/tinfo-t.h b/include/haproxy/tinfo-t.h index f061a6e79..aacf3f10e 100644 --- a/include/haproxy/tinfo-t.h +++ b/include/haproxy/tinfo-t.h @@ -84,6 +84,7 @@ enum thread_exec_ctx_type { TH_EX_CTX_SMPF, /* directly registered sample fetch function, using .smpf_kwl */ TH_EX_CTX_CONV, /* directly registered converter function, using .conv_kwl */ TH_EX_CTX_FUNC, /* hopefully recognizable function/callback, using .pointer */ + TH_EX_CTX_ACTION, /* directly registered action function, using .action_kwl */ }; struct thread_exec_ctx { @@ -95,6 +96,7 @@ struct thread_exec_ctx { const struct ha_caller *ha_caller; /* used with TH_EX_CTX_CALLER */ const struct sample_fetch_kw_list *smpf_kwl; /* used with TH_EX_CTX_SMPF */ const struct sample_conv_kw_list *conv_kwl; /* used with TH_EX_CTX_CONV */ + const struct action_kw_list *action_kwl; /* used with TH_EX_CTX_ACTION */ }; }; diff --git a/src/action.c b/src/action.c index 9c5153b1c..a695202b7 100644 --- a/src/action.c +++ b/src/action.c @@ -400,6 +400,9 @@ void act_add_list(struct list *head, struct action_kw_list *kw_list) if (caller_initcall) { kw_list->kw[i].exec_ctx.type = TH_EX_CTX_INITCALL; kw_list->kw[i].exec_ctx.initcall = caller_initcall; + } else { + kw_list->kw[i].exec_ctx.type = TH_EX_CTX_ACTION; + kw_list->kw[i].exec_ctx.action_kwl = kw_list; } } LIST_APPEND(head, &kw_list->list); diff --git a/src/tools.c b/src/tools.c index 58fa78013..eaf655722 100644 --- a/src/tools.c +++ b/src/tools.c @@ -7539,6 +7539,9 @@ void chunk_append_thread_ctx(struct buffer *output, const struct thread_exec_ctx resolve_sym_name(output, "func '", ctx->pointer); chunk_appendf(output,"'"); break; + case TH_EX_CTX_ACTION: + chunk_appendf(output,"act kwl starting with '%s'", ctx->action_kwl->kw[0].kw); + break; default: chunk_appendf(output,"other ctx %p", ctx->pointer); break;