]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
better debug output
authorAlan T. DeKok <aland@freeradius.org>
Mon, 28 Nov 2022 00:16:11 +0000 (19:16 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 12 Dec 2022 15:27:37 +0000 (10:27 -0500)
src/lib/unlang/xlat_eval.c

index c4ad72f2b8c9f8090160e18bd47930b9a705f302..75f8c23410dd5415a4a09cdc0dde98bb287d8906 100644 (file)
@@ -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);