Short-circuit "case"
authorAlan T. DeKok <aland@freeradius.org>
Thu, 19 Sep 2013 01:54:25 +0000 (21:54 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 19 Sep 2013 01:55:01 +0000 (21:55 -0400)
src/main/modcall.c

index 10164ad..313ea4a 100644 (file)
@@ -812,6 +812,12 @@ calculate_result:
                entry->priority = priority;
        }
 
+       /*
+        *      If we're processing a "case" statement, we return once
+        *      it's done, rather than going to the next "case" statement.
+        */
+       if (c->type == MOD_CASE) return true;   
+
 next_sibling:
        entry->c = entry->c->next;