26RCSID(
"$Id: dc081b90d02db18862a3f053b5fa7df81df76f5e $")
28#include <freeradius-devel/util/syserror.h>
29#include <freeradius-devel/server/rcode.h>
120 if (
depth == 1)
return NULL;
122 for (i =
depth - 1; i > 0; i--) {
125 frame = &
stack->frame[i];
141 .name =
"transaction",
145 .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(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.
rlm_rcode_t rcode
The current rcode, from executing the instruction or merging the result from a frame.
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_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_TIMEOUT
Module (or section) timed out.
@ RLM_MODULE_NOTFOUND
User not found.
@ RLM_MODULE_UPDATED
OK (pairs modified).
@ RLM_MODULE_NOT_SET
Error resolving rcode (should not be returned by modules).
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
@ RLM_MODULE_NUMCODES
How many valid return codes there are.
@ RLM_MODULE_HANDLED
The module handled the request, so stop.
fr_signal_t
Signals that can be generated/processed by request signal handlers.
@ FR_SIGNAL_CANCEL
Request has been cancelled.
void unlang_transaction_init(void)
static unlang_action_t unlang_transaction(UNUSED unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame)
static unlang_action_t unlang_transaction_final(UNUSED unlang_result_t *p_result, UNUSED request_t *request, unlang_stack_frame_t *frame)
Commit a successful transaction.
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.
@ UNLANG_OP_FLAG_DEBUG_BRACES
Print debug braces.
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.