]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use new foreach syntax
authorNick Porter <nick@portercomputing.co.uk>
Wed, 13 Nov 2024 11:27:58 +0000 (11:27 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 13 Nov 2024 17:07:46 +0000 (17:07 +0000)
raddb/policy.d/vendor

index a04d7fcfe9b95dac1ea6134917d34dad9f7ca1d6..c409512c0bf9692c4b67aea26600af8bf1430d48 100644 (file)
@@ -5,9 +5,9 @@
 #  attributes, but it can be done with unlang for specific ones.
 #
 broadsoft-decode {
-       foreach &BroadSoft-Attr-255 {
-               if ("%{Foreach-Variable-0}" =~ /^([0-9]+)=(.*)$/) {
-#                              &request.Broadsoft-Attr-255 -= "%{Foreach-Variable-0}"
+       foreach value ( BroadSoft-Attr-255 ) {
+               if (value =~ /^([0-9]+)=(.*)$/) {
+#                              &request.Broadsoft-Attr-255 -= value
                                "&request.BroadSoft-Attr-%{1}" += "%{2}"
                }
        }