From: Alan T. DeKok Date: Sat, 13 Dec 2025 19:47:27 +0000 (-0500) Subject: add API to cancel any pending retry X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dc220ebc279e5126e516faf418a30542357813b;p=thirdparty%2Ffreeradius-server.git add API to cancel any pending retry --- diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index d88d0bee747..0d17ea368d9 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -1305,6 +1305,19 @@ void unlang_interpret_request_prioritise(request_t *request, uint32_t priority) if (intp->funcs.prioritise) intp->funcs.prioritise(request, intp->uctx); } +/** Cancel any pending retry + * + * @param[in] request The current request. + */ +void unlang_interpret_request_cancel_retry(request_t *request) +{ + unlang_stack_t *stack = request->stack; + unlang_stack_frame_t *frame = &stack->frame[stack->depth]; + + TALLOC_FREE(frame->retry); +} + + /** Delivers a frame to one or more frames in the stack * * This is typically called via an "async" action, i.e. an action outside diff --git a/src/lib/unlang/interpret.h b/src/lib/unlang/interpret.h index 46ad1c6845a..4ce8cd056d8 100644 --- a/src/lib/unlang/interpret.h +++ b/src/lib/unlang/interpret.h @@ -194,6 +194,8 @@ bool unlang_request_is_done(request_t const *request); void unlang_interpret_request_done(request_t *request); +void unlang_interpret_request_cancel_retry(request_t *request); + void unlang_interpret_request_prioritise(request_t *request, uint32_t priority); void unlang_interpret_mark_runnable(request_t *request);