]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
slight tweaks
authorAlan T. DeKok <aland@freeradius.org>
Thu, 17 Jul 2025 17:15:18 +0000 (13:15 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 17 Jul 2025 19:37:21 +0000 (15:37 -0400)
src/lib/unlang/finally.c

index ec4205bed0deff3a27bed6a630e836db68a7ad95..3d74c7296e1fde6c3e2a8dc00c1eb4bb3f6395cc 100644 (file)
@@ -75,8 +75,6 @@ static unlang_action_t unlang_finally(UNUSED unlang_result_t *p_result, request_
 {
        unlang_frame_state_finally_t    *state = talloc_get_type_abort(frame->state, unlang_frame_state_finally_t);
 
-       state->original_rcode = request->rcode;;
-
        /*
         *      Ensure the request has at least min_time to continue
         *      executing before we cancel it.
@@ -109,7 +107,7 @@ static unlang_action_t unlang_finally(UNUSED unlang_result_t *p_result, request_
        return UNLANG_ACTION_PUSHED_CHILD;
 }
 
-/** Push a finally instructtion on the stack, to be evaluated as the stack is unwound
+/** Push a finally instruction on the stack, to be evaluated as the stack is unwound
  *
  * @param[in] request          to push timeout onto
  * @param[in] instruction      to run as we unwind
@@ -159,9 +157,12 @@ int unlang_finally_push_instruction(request_t *request, void *instruction, fr_ti
         *      Allocate its state
         */
        MEM(frame->state = state = talloc_zero(stack, unlang_frame_state_finally_t));
+
        state->instruction = instruction;
        state->request = request;
        state->min_time = min_time;
+       state->original_rcode = request->rcode;;
+       state->result = UNLANG_RESULT_NOT_SET;
 
        frame_repeat(frame, unlang_finally);    /* execute immediately... or when unwinding */