25 RCSID(
"$Id: 1fd47f7ef55647047ca3281240cd16f8c3a61273 $")
27 #include "unlang_priv.h"
58 unlang = unlang->
next) {
95 unlang = unlang->
next) {
99 RWDEBUG2(
"Failed to 'catch' error %s",
101 frame->
next = unlang;
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
@ UNLANG_ACTION_EXECUTE_NEXT
Execute the next unlang_t.
@ UNLANG_ACTION_CALCULATE_RESULT
Calculate a new section rlm_rcode_t value.
static unlang_action_t cleanup(unlang_stack_frame_t *frame, unlang_t *unlang)
static unlang_action_t unlang_catch(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
static unlang_action_t catch_skip_to_next(UNUSED rlm_rcode_t *p_result, UNUSED request_t *request, unlang_stack_frame_t *frame)
void unlang_catch_init(void)
unlang_action_t unlang_interpret_skip_to_catch(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Skip ahead to a particular "catch" instruction.
Declarations for the "catch" keyword.
static unlang_catch_t const * unlang_generic_to_catch(unlang_t const *g)
Cast a generic structure to the catch keyword extension.
bool catching[RLM_MODULE_NUMCODES]
fr_table_num_sorted_t const mod_rcode_table[]
unlang_action_t unlang_interpret_push_children(rlm_rcode_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.
#define RWDEBUG2(fmt,...)
void unlang_register(int type, unlang_op_t *op)
Register an operation with the interpreter.
rlm_rcode_t
Return codes indicating the result of the module call.
#define fr_table_str_by_value(_table, _number, _def)
Convert an integer to a string.
unlang_t * next
Next node (executed on UNLANG_ACTION_EXECUTE_NEXT et al).
#define UNLANG_NEXT_SIBLING
static void frame_cleanup(unlang_stack_frame_t *frame)
Cleanup any lingering frame state.
@ UNLANG_TYPE_TRY
try / catch blocks
@ UNLANG_TYPE_CATCH
catch a previous try
static void frame_repeat(unlang_stack_frame_t *frame, unlang_process_t process)
Mark the current stack frame up for repeat, and set a new process function.
unlang_t const * instruction
The unlang node we're evaluating.
rlm_rcode_t result
The result from executing the instruction.
unlang_t const * next
The next unlang node we will evaluate.
unlang_type_t type
The specialisation of this node.
A node in a graph of unlang_op_t (s) that we execute.
Our interpreter stack, as distinct from the C stack.