]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't stop on ret>0, stop *recursing*
authorAlan T. DeKok <aland@freeradius.org>
Wed, 8 Jun 2022 13:28:16 +0000 (09:28 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 17 Jun 2022 12:40:37 +0000 (08:40 -0400)
and continue with the next node

src/lib/unlang/xlat_eval.c

index e3ef3aa347eb97a7e640a3958fe99bb80e840380..2607046a87976f7b6a812b837d9895aa3231bb9a 100644 (file)
@@ -1813,7 +1813,6 @@ int xlat_eval_walk(xlat_exp_head_t *head, xlat_walker_t walker, xlat_type_t type
                        if (!type || (type & XLAT_FUNC)) {
                                ret = walker(node, uctx);
                                if (ret < 0) return ret;
-                               if (ret > 0) return 0;
                        }
                        break;
 
@@ -1826,7 +1825,6 @@ int xlat_eval_walk(xlat_exp_head_t *head, xlat_walker_t walker, xlat_type_t type
                        if (!type || (type & XLAT_FUNC_UNRESOLVED)) {
                                ret = walker(node, uctx);
                                if (ret < 0) return ret;
-                               if (ret > 0) return 0;
                        }
                        break;
 
@@ -1834,7 +1832,7 @@ int xlat_eval_walk(xlat_exp_head_t *head, xlat_walker_t walker, xlat_type_t type
                        if (!type || (type & XLAT_ALTERNATE)) {
                                ret = walker(node, uctx);
                                if (ret < 0) return ret;
-                               if (ret > 0) return 0;
+                               if (ret > 0) continue;
                        }
 
                        /*
@@ -1854,7 +1852,7 @@ int xlat_eval_walk(xlat_exp_head_t *head, xlat_walker_t walker, xlat_type_t type
                        if (!type || (type & XLAT_GROUP)) {
                                ret = walker(node, uctx);
                                if (ret < 0) return ret;
-                               if (ret > 0) return 0;
+                               if (ret > 0) continue;
                        }
 
                        /*
@@ -1868,8 +1866,8 @@ int xlat_eval_walk(xlat_exp_head_t *head, xlat_walker_t walker, xlat_type_t type
                        if (!type || (type & node->type)) {
                                ret = walker(node, uctx);
                                if (ret < 0) return ret;
-                               if (ret > 0) return 0;
                        }
+                       break;
                }
        }