From: Alan T. DeKok Date: Mon, 28 Nov 2022 00:16:11 +0000 (-0500) Subject: better debug output X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb4427abb13176cf590cd708c008e19d850e2498;p=thirdparty%2Ffreeradius-server.git better debug output --- diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index c4ad72f2b8c..75f8c23410d 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -92,7 +92,11 @@ static char *xlat_fmt_aprint(TALLOC_CTX *ctx, xlat_exp_t const *node) case XLAT_TMPL: fr_assert(node->fmt != NULL); - return talloc_asprintf(ctx, "%%{%s}", node->fmt); + if (tmpl_is_attr(node->vpt) && (node->fmt[0] == '&')) { + return talloc_strdup(ctx, node->fmt); + } else { + return talloc_asprintf(ctx, "%%{%s}", node->fmt); + } case XLAT_VIRTUAL: return talloc_asprintf(ctx, "%%{%s}", node->call.func->name);