From: Alan T. DeKok Date: Wed, 16 Sep 2020 12:26:27 +0000 (-0400) Subject: lists and attributes use the same code, but lists aren't attributes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afb82f06d9eae0918b284f23a03bb98fab9df549;p=thirdparty%2Ffreeradius-server.git lists and attributes use the same code, but lists aren't attributes --- diff --git a/src/lib/server/tmpl.c b/src/lib/server/tmpl.c index b92b1e08e38..e1098e14ac2 100644 --- a/src/lib/server/tmpl.c +++ b/src/lib/server/tmpl.c @@ -3476,7 +3476,7 @@ ssize_t tmpl_attr_print(fr_sbuff_t *out, tmpl_t const *vpt, tmpl_attr_ref_prefix * we add the .unknown prefix. * */ - if (tmpl_contains_attr(vpt) && (ar = fr_dlist_tail(&vpt->data.attribute.ar))) { + if (!tmpl_is_list(vpt) && (ar = fr_dlist_tail(&vpt->data.attribute.ar))) { switch (ar->type) { case TMPL_ATTR_TYPE_NORMAL: case TMPL_ATTR_TYPE_UNKNOWN: @@ -3494,7 +3494,7 @@ ssize_t tmpl_attr_print(fr_sbuff_t *out, tmpl_t const *vpt, tmpl_attr_ref_prefix * Print attribute identifiers */ while ((ar = fr_dlist_next(&vpt->data.attribute.ar, ar))) { - switch(ar->type) { + if (!tmpl_is_list(vpt)) switch(ar->type) { /* * For normal attributes we use the name */