]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
only print out top-level list
authorAlan T. DeKok <aland@freeradius.org>
Sun, 1 Sep 2024 14:47:26 +0000 (10:47 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 1 Sep 2024 14:49:44 +0000 (10:49 -0400)
so we don't print the inner-most things repeatedly

src/lib/unlang/edit.c

index d82ad41f0c69b280642e586db5436105185b427f..9e5f7543510a1b72d899c25830fe96d34a6888c6 100644 (file)
@@ -457,13 +457,15 @@ apply_list:
        /*
         *      Print the children before we do the modifications.
         */
-       RDEBUG2("%s %s {", current->lhs.vpt->name, fr_tokens[map->op]);
-       if (fr_debug_lvl >= L_DBG_LVL_2) {
-               RINDENT();
-               edit_debug_attr_list(request, children, map);
-               REXDENT();
+       if (!current->parent) {
+               RDEBUG2("%s %s {", current->lhs.vpt->name, fr_tokens[map->op]);
+               if (fr_debug_lvl >= L_DBG_LVL_2) {
+                       RINDENT();
+                       edit_debug_attr_list(request, children, map);
+                       REXDENT();
+               }
+               RDEBUG2("}");
        }
-       RDEBUG2("}");
 
        fr_pair_list_foreach(children, child) {
                if (!fr_dict_attr_can_contain(current->lhs.vp->da, child->da)) {