]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
notes on break / foreach
authorAlan T. DeKok <aland@freeradius.org>
Thu, 1 Aug 2019 11:44:48 +0000 (07:44 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 1 Aug 2019 11:45:39 +0000 (07:45 -0400)
src/lib/unlang/interpret.c

index 141c0a92fa3f67b6428bd330a3d0db007855b50c..a08cc507aa2281e2aaa84cdb4ba785a0f72069b2 100644 (file)
@@ -497,6 +497,10 @@ static inline unlang_frame_action_t frame_eval(REQUEST *request, unlang_stack_fr
                /*
                 *      We're in a looping construct and need to stop
                 *      execution of the current section.
+                *
+                *      @todo - ensure that a "break" is recursive,
+                *      and that the interpreter keeps popping until
+                *      it reaches an enclosing "foreach".
                 */
                case UNLANG_ACTION_BREAK:
                        if (*priority < 0) *priority = 0;
@@ -657,6 +661,10 @@ rlm_rcode_t unlang_interpret_run(REQUEST *request)
                         *      Resume a "foreach" loop, or a "load-balance" section
                         *      or anything else that needs to be checked on the way
                         *      back on up the stack.
+                        *
+                        *      @todo - if the child was "break", then
+                        *      keep popping until such time as we
+                        *      reach the encosing "foreach".
                         */
                        if (frame->repeat) {
                                fa = UNLANG_FRAME_ACTION_NEXT;