25RCSID(
"$Id: d2673ba3b6cedded9b57cd6c6755229a41ed3791 $")
27#include <freeradius-devel/server/rcode.h>
48 gext->
catch[rcode] = c;
69 cf_log_err(cs,
"Found 'catch' section with no previous 'try'");
95 if (gext->
catch[i])
continue;
122 (void) talloc_steal(gext, c);
143 .unlang_name =
"unlang_group_t",
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
static void catch_argv(unlang_try_t *gext, char const *name, unlang_t *c)
static unlang_action_t unlang_catch(UNUSED unlang_result_t *p_result, request_t *request, UNUSED unlang_stack_frame_t *frame)
void unlang_catch_init(void)
static unlang_t * unlang_compile_catch(unlang_t *parent, unlang_compile_ctx_t *unlang_ctx, CONF_ITEM const *ci)
Common header for all CONF_* types.
A section grouping multiple CONF_PAIR.
char const * cf_section_name2(CONF_SECTION const *cs)
Return the second identifier of a CONF_SECTION.
char const * cf_section_name1(CONF_SECTION const *cs)
Return the second identifier of a CONF_SECTION.
CONF_SECTION * cf_item_to_section(CONF_ITEM const *ci)
Cast a CONF_ITEM to a CONF_SECTION.
char const * cf_section_argv(CONF_SECTION const *cs, int argc)
Return variadic argument at the specified index.
#define cf_log_err(_cf, _fmt,...)
unlang_t * unlang_compile_children(unlang_group_t *g, unlang_compile_ctx_t *unlang_ctx_in)
unlang_group_t * unlang_group_allocate(unlang_t *parent, CONF_SECTION *cs, unlang_type_t type)
fr_table_num_sorted_t const mod_rcode_table[]
unlang_action_t unlang_interpret_push_children(unlang_result_t *p_result, request_t *request, rlm_rcode_t default_rcode, bool do_next_sibling)
Push the children of the current frame onto a new frame onto the stack.
static TALLOC_CTX * unlang_ctx
void unlang_register(unlang_op_t *op)
Register an operation with the interpreter.
rlm_rcode_t
Return codes indicating the result of the module call.
@ RLM_MODULE_NOT_SET
Error resolving rcode (should not be returned by modules).
@ RLM_MODULE_NUMCODES
How many valid return codes there are.
#define fr_table_value_by_str(_table, _name, _def)
Convert a string to a value using a sorted or ordered table.
char * talloc_typed_asprintf(TALLOC_CTX *ctx, char const *fmt,...)
Call talloc vasprintf, setting the type on the new chunk correctly.
Declaration for unlang try.
unlang_t * catch[RLM_MODULE_NUMCODES]
Private interpreter structures and functions.
#define UNLANG_NEXT_SIBLING
char const * debug_name
Printed in log messages when the node is executed.
unlang_t * parent
Previous node.
static unlang_t * unlang_group_to_generic(unlang_group_t const *p)
static unlang_group_t * unlang_generic_to_group(unlang_t const *p)
char const * name
Unknown...
@ UNLANG_TYPE_TRY
try / catch blocks
@ UNLANG_TYPE_CATCH
catch a previous try
@ UNLANG_OP_FLAG_DEBUG_BRACES
Print debug braces.
unlang_type_t type
The specialisation of this node.
unlang_list_t * list
so we have fewer run-time dereferences
Generic representation of a grouping.
A node in a graph of unlang_op_t (s) that we execute.
Our interpreter stack, as distinct from the C stack.
#define DOC_KEYWORD_REF(_x)