From: Alan T. DeKok Date: Mon, 14 Nov 2022 14:51:38 +0000 (-0500) Subject: expose frame_signal for use in timeout keyword X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38750f47de46c7fa94cb6fc51c3b10057f15863c;p=thirdparty%2Ffreeradius-server.git expose frame_signal for use in timeout keyword --- diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 46558639497..4af5ea3208d 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -1025,7 +1025,7 @@ void unlang_interpret_request_detach(request_t *request) * @param[in] action to signal. * @param[in] limit the frame at which to stop signaling. */ -static inline CC_HINT(always_inline) void frame_signal(request_t *request, fr_state_signal_t action, int limit) +void unlang_frame_signal(request_t *request, fr_state_signal_t action, int limit) { unlang_stack_frame_t *frame; unlang_stack_t *stack = request->stack; @@ -1101,7 +1101,7 @@ void unlang_interpret_signal(request_t *request, fr_state_signal_t action) * yet should have a stack depth of zero, so we don't * need to do anything. */ - if (stack && (stack->depth > 0)) frame_signal(request, action, 0); + if (stack && (stack->depth > 0)) unlang_frame_signal(request, action, 0); switch (action) { case FR_SIGNAL_CANCEL: @@ -1129,7 +1129,7 @@ static void instruction_timeout_handler(UNUSED fr_event_list_t *el, UNUSED fr_ti /* * Signal all lower frames to exit. */ - frame_signal(request, FR_SIGNAL_CANCEL, retry->depth); + unlang_frame_signal(request, FR_SIGNAL_CANCEL, retry->depth); retry->state = FR_RETRY_MRD; unlang_interpret_mark_runnable(request); diff --git a/src/lib/unlang/unlang_priv.h b/src/lib/unlang/unlang_priv.h index cf605632228..e97464b292c 100644 --- a/src/lib/unlang/unlang_priv.h +++ b/src/lib/unlang/unlang_priv.h @@ -248,6 +248,8 @@ void unlang_frame_perf_cleanup(unlang_stack_frame_t *frame); #define unlang_frame_perf_cleanup(_x) #endif +void unlang_frame_signal(request_t *request, fr_state_signal_t action, int limit); + typedef struct { request_t *request; int depth; //!< of this retry structure