From: Alan T. DeKok Date: Tue, 15 Jul 2025 13:04:08 +0000 (-0400) Subject: print rcode if we don't get passed options X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58859ab7f8d53dfc77053c3bb3d0e1b84a8d6e3d;p=thirdparty%2Ffreeradius-server.git print rcode if we don't get passed options --- diff --git a/src/lib/unlang/xlat_expr.c b/src/lib/unlang/xlat_expr.c index a9c70ea5e71..286e59b13bb 100644 --- a/src/lib/unlang/xlat_expr.c +++ b/src/lib/unlang/xlat_expr.c @@ -1629,10 +1629,16 @@ static xlat_action_t xlat_func_expr_rcode(TALLOC_CTX *ctx, fr_dcursor_t *out, /* * If we have zero args, it's because the instantiation - * function consumed them. om nom nom. + * function consumed them. Unless the user read the debug + * output, and tried to see what the rcode is, in case we */ if (fr_value_box_list_num_elements(args) == 0) { - fr_assert(inst->rcode != RLM_MODULE_NOT_SET); + if (inst->rcode == RLM_MODULE_NOT_SET) { + RDEBUG("Request rcode is '%s'", + fr_table_str_by_value(rcode_table, request->rcode, "")); + return XLAT_ACTION_DONE; + } + rcode = inst->rcode; } else { XLAT_ARGS(args, &arg_rcode);