26 RCSID(
"$Id: 4e8118c7bb7cb93bfa7fa37fe88ed73083769f11 $")
28 #include <freeradius-devel/util/syserror.h>
46 if (action != FR_SIGNAL_CANCEL)
return;
106 if (
depth == 1)
return NULL;
108 for (i =
depth - 1; i > 0; i--) {
111 frame = &
stack->frame[i];
127 .name =
"transaction",
131 .frame_state_type =
"unlang_frame_state_transaction_t",
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
@ UNLANG_ACTION_FAIL
Encountered an unexpected error.
@ UNLANG_ACTION_CALCULATE_RESULT
Calculate a new section rlm_rcode_t value.
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.
void unlang_register(int type, unlang_op_t *op)
Register an operation with the interpreter.
static char * stack[MAX_STACK]
static uint8_t depth(fr_minmax_heap_index_t i)
rlm_rcode_t
Return codes indicating the result of the module call.
@ RLM_MODULE_INVALID
The module considers the request invalid.
@ RLM_MODULE_OK
The module is OK, continue.
@ RLM_MODULE_FAIL
Module failed, don't reply.
@ RLM_MODULE_DISALLOW
Reject the request (user is locked out).
@ RLM_MODULE_REJECT
Immediately reject the request.
@ RLM_MODULE_UPDATED
OK (pairs modified).
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
@ RLM_MODULE_HANDLED
The module handled the request, so stop.
MEM(pair_append_request(&vp, attr_eap_aka_sim_identity) >=0)
static unlang_action_t unlang_transaction_final(rlm_rcode_t *p_result, UNUSED request_t *request, unlang_stack_frame_t *frame)
Commit a successful transaction.
static unlang_action_t unlang_transaction(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
void unlang_transaction_init(void)
fr_edit_list_t * unlang_interpret_edit_list(request_t *request)
static void unlang_transaction_signal(UNUSED request_t *request, unlang_stack_frame_t *frame, fr_signal_t action)
Signal a transaction to abort.
Declarations for unlang transactions.
Declarations for unlang transactions.
fr_edit_list_t * el
my edit list
A transaction stack entry.
#define UNLANG_NEXT_SIBLING
void * state
Stack frame specialisations.
@ UNLANG_TYPE_TRANSACTION
transactions for editing lists
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_type_t type
The specialisation of this node.
Our interpreter stack, as distinct from the C stack.
An unlang stack associated with a request.
void fr_edit_list_commit(fr_edit_list_t *el)
Commit an edit list.
void fr_edit_list_abort(fr_edit_list_t *el)
Abort the entries in an edit list.
fr_edit_list_t * fr_edit_list_alloc(TALLOC_CTX *ctx, int hint, fr_edit_list_t *parent)
Allocate an edit list.