]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Always set repeatable if we have a repeat function
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 6 Jun 2025 06:04:53 +0000 (00:04 -0600)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 18 Jun 2025 12:53:20 +0000 (13:53 +0100)
This means the start function will run as the stack is burned down

src/lib/unlang/function.c

index 4a9a4de352af58ddba2d373050de109cc1a2b2b1..dbf34b2069a3843ec866bfd706b88dac793313ee 100644 (file)
@@ -457,6 +457,8 @@ unlang_action_t unlang_function_push_common(unlang_result_t *p_result,
        REPEAT(state) = repeat;
        state->repeat_name = repeat_name;
 
+       if (repeat) repeatable_set(frame); /* execute on the way back up */
+
        return UNLANG_ACTION_PUSHED_CHILD;
 }
 
@@ -506,7 +508,6 @@ unlang_action_t _unlang_function_push_with_result(unlang_result_t *p_result,
        frame = frame_current(request);
        if (!func && repeat) {
                frame->process = call_with_result_repeat;
-               repeatable_set(frame);                          /* execute on the way back up */
        } else {
                frame->process = call_with_result;
        }
@@ -557,7 +558,6 @@ unlang_action_t _unlang_function_push_no_result(request_t *request,
        frame = frame_current(request);
        if (!func && repeat) {
                frame->process = call_no_result_repeat;
-               repeatable_set(frame);                          /* execute on the way back up */
        }
 
        /* frame->process = call_no_result - This is the default, we don't need to set it again */