From: Arran Cudbard-Bell Date: Tue, 29 Apr 2025 23:51:36 +0000 (-0400) Subject: We don't need to set the result when we're cancelling the request X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a765ccc6420adde4465c6cefd37f645eeb2cc459;p=thirdparty%2Ffreeradius-server.git We don't need to set the result when we're cancelling the request --- diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 2c5bba0511..6d29446e26 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -254,7 +254,6 @@ unlang_action_t unlang_interpret_push_children(rlm_rcode_t *p_result, request_t } if (unlang_interpret_push(request, g->children, default_rcode, do_next_sibling, UNLANG_SUB_FRAME) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } diff --git a/src/lib/unlang/load_balance.c b/src/lib/unlang/load_balance.c index 52305ede8a..5ad345fcc4 100644 --- a/src/lib/unlang/load_balance.c +++ b/src/lib/unlang/load_balance.c @@ -82,7 +82,6 @@ static unlang_action_t unlang_load_balance_next(rlm_rcode_t *p_result, request_t * Push the child, and yield for a later return. */ if (unlang_interpret_push(request, redundant->child, frame->result, UNLANG_NEXT_STOP, UNLANG_SUB_FRAME) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } @@ -230,7 +229,6 @@ static unlang_action_t unlang_load_balance(rlm_rcode_t *p_result, request_t *req if (frame->instruction->type == UNLANG_TYPE_LOAD_BALANCE) { if (unlang_interpret_push(request, redundant->found, frame->result, UNLANG_NEXT_STOP, UNLANG_SUB_FRAME) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; diff --git a/src/lib/unlang/map.c b/src/lib/unlang/map.c index c2e7a9c603..82b8c2c227 100644 --- a/src/lib/unlang/map.c +++ b/src/lib/unlang/map.c @@ -143,7 +143,6 @@ static unlang_action_t list_mod_create(rlm_rcode_t *p_result, request_t *request if (unlang_tmpl_push(update_state, &update_state->lhs_result, request, map->lhs, NULL) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; @@ -151,7 +150,6 @@ static unlang_action_t list_mod_create(rlm_rcode_t *p_result, request_t *request case TMPL_TYPE_XLAT: if (unlang_xlat_push(update_state, NULL, &update_state->lhs_result, request, tmpl_xlat(map->lhs), false) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; @@ -186,7 +184,6 @@ static unlang_action_t list_mod_create(rlm_rcode_t *p_result, request_t *request case TMPL_TYPE_EXEC: if (unlang_tmpl_push(update_state, &update_state->rhs_result, request, map->rhs, NULL) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; @@ -194,7 +191,6 @@ static unlang_action_t list_mod_create(rlm_rcode_t *p_result, request_t *request case TMPL_TYPE_XLAT: if (unlang_xlat_push(update_state, NULL, &update_state->rhs_result, request, tmpl_xlat(map->rhs), false) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; @@ -351,7 +347,6 @@ static unlang_action_t unlang_map_state_init(rlm_rcode_t *p_result, request_t *r case TMPL_TYPE_EXEC: if (unlang_tmpl_push(map_proc_state, &map_proc_state->src_result, request, inst->src, NULL) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; @@ -359,7 +354,6 @@ static unlang_action_t unlang_map_state_init(rlm_rcode_t *p_result, request_t *r case TMPL_TYPE_XLAT: if (unlang_xlat_push(map_proc_state, NULL, &map_proc_state->src_result, request, tmpl_xlat(inst->src), false) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; diff --git a/src/lib/unlang/switch.c b/src/lib/unlang/switch.c index bfe95db560..719dd8299c 100644 --- a/src/lib/unlang/switch.c +++ b/src/lib/unlang/switch.c @@ -115,7 +115,6 @@ do_null_case: if (!found) return UNLANG_ACTION_EXECUTE_NEXT; if (unlang_interpret_push(request, found, frame->result, UNLANG_NEXT_STOP, UNLANG_SUB_FRAME) < 0) { - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } diff --git a/src/lib/unlang/timeout.c b/src/lib/unlang/timeout.c index cca9e1e7ad..90789f0a7d 100644 --- a/src/lib/unlang/timeout.c +++ b/src/lib/unlang/timeout.c @@ -119,7 +119,6 @@ static unlang_action_t unlang_timeout_set(rlm_rcode_t *p_result, request_t *requ if (fr_timer_at(state, unlang_interpret_event_list(request)->tl, &state->ev, timeout, false, unlang_timeout_handler, state) < 0) { RPEDEBUG("Failed inserting event"); - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } diff --git a/src/lib/unlang/tmpl.c b/src/lib/unlang/tmpl.c index 074e0e3865..9ae5faf76f 100644 --- a/src/lib/unlang/tmpl.c +++ b/src/lib/unlang/tmpl.c @@ -238,7 +238,6 @@ static unlang_action_t unlang_tmpl(rlm_rcode_t *p_result, request_t *request, un push: if (unlang_xlat_push(state->ctx, NULL, &state->list, request, tmpl_xlat(ut->tmpl), false) < 0) { fail: - *p_result = RLM_MODULE_FAIL; return UNLANG_ACTION_STOP_PROCESSING; } diff --git a/src/lib/unlang/xlat.c b/src/lib/unlang/xlat.c index 371cf35849..8bb069af55 100644 --- a/src/lib/unlang/xlat.c +++ b/src/lib/unlang/xlat.c @@ -345,7 +345,6 @@ static unlang_action_t unlang_xlat_repeat(rlm_rcode_t *p_result, request_t *requ */ fr_value_box_list_talloc_free(&state->out); if (unlang_xlat_push(state->ctx, state->success, &state->out, request, child, false) < 0) { - *p_result = RLM_MODULE_FAIL; REXDENT(); return UNLANG_ACTION_STOP_PROCESSING; } @@ -410,7 +409,6 @@ static unlang_action_t unlang_xlat(rlm_rcode_t *p_result, request_t *request, un */ fr_value_box_list_talloc_free(&state->out); if (unlang_xlat_push(state->ctx, state->success, &state->out, request, child, false) < 0) { - *p_result = RLM_MODULE_FAIL; RINDENT_RESTORE(request, state); return UNLANG_ACTION_STOP_PROCESSING; } @@ -528,7 +526,6 @@ static unlang_action_t unlang_xlat_resume(rlm_rcode_t *p_result, request_t *requ */ fr_value_box_list_talloc_free(&state->out); if (unlang_xlat_push(state->ctx, state->success, &state->out, request, child, false) < 0) { - *p_result = RLM_MODULE_FAIL; RINDENT_RESTORE(request, state); return UNLANG_ACTION_STOP_PROCESSING; }