]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add API to cancel any pending retry
authorAlan T. DeKok <aland@freeradius.org>
Sat, 13 Dec 2025 19:47:27 +0000 (14:47 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 13 Dec 2025 20:00:32 +0000 (20:00 +0000)
src/lib/unlang/interpret.c
src/lib/unlang/interpret.h

index d88d0bee747d2d665b7108bf41ba22f7dc4dd2cd..0d17ea368d905be7639795af155df8cc3e653bf0 100644 (file)
@@ -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
index 46ad1c6845a4a9400b059dc9413f2f4199211a9b..4ce8cd056d872c33298982319dd1cabb5321e7e8 100644 (file)
@@ -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);