From: Arran Cudbard-Bell Date: Fri, 12 Apr 2024 19:53:29 +0000 (-0600) Subject: Execute all the children of a timeout section ‽ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1efdd097f228cef6cdab84a430dd3492323e65e;p=thirdparty%2Ffreeradius-server.git Execute all the children of a timeout section ‽ --- diff --git a/src/lib/unlang/timeout.c b/src/lib/unlang/timeout.c index 3f41f34ba08..a33421f8573 100644 --- a/src/lib/unlang/timeout.c +++ b/src/lib/unlang/timeout.c @@ -93,7 +93,7 @@ static unlang_action_t unlang_timeout_set(rlm_rcode_t *p_result, request_t *requ frame_repeat(frame, unlang_timeout_resume_done); state->success = true; - return unlang_interpret_push_children(p_result, request, frame->result, UNLANG_NEXT_STOP); + return unlang_interpret_push_children(p_result, request, frame->result, UNLANG_NEXT_SIBLING); } static unlang_action_t unlang_timeout_xlat_done(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) diff --git a/src/tests/keywords/timeout b/src/tests/keywords/timeout index 776b91a36bf..4765ed335af 100644 --- a/src/tests/keywords/timeout +++ b/src/tests/keywords/timeout @@ -2,6 +2,8 @@ # PRE: xlat-delay # float32 a +bool b +bool c # # Set a timeout which will fire, and cause the block to fail. @@ -13,7 +15,7 @@ redundant { } group { - success + ok } } @@ -24,6 +26,20 @@ redundant { } group { - success + ok } } + +# Regression test - Only the first child of the timeout block was executed +redundant { + timeout 1s { + &b = true + &c = true + } +} + +if (!(&b && &c)) { + test_fail +} + +success