From 1ca1b48bcdf37f156180685e3603a3a7f15a5c23 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 15 Jan 2019 10:38:47 +0100 Subject: [PATCH] collect-wireless-mac: simplify array access --- collect-wireless-mac.capsman | 2 +- collect-wireless-mac.local | 2 +- collect-wireless-mac.template | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collect-wireless-mac.capsman b/collect-wireless-mac.capsman index cca29e8..bda3415 100644 --- a/collect-wireless-mac.capsman +++ b/collect-wireless-mac.capsman @@ -18,7 +18,7 @@ :foreach RegTbl in=[ / caps-man registration-table find ] do={ :local Mac [ / caps-man registration-table get $RegTbl mac-address ]; - :local AccessList [ :pick [ / caps-man access-list find where mac-address=$Mac ] 0 ]; + :local AccessList ([ / caps-man access-list find where mac-address=$Mac ]->0); :if ([ :len $AccessList ] = 0) do={ :local HostName "no dhcp lease"; :local Address "no dhcp lease"; diff --git a/collect-wireless-mac.local b/collect-wireless-mac.local index 49f3128..5bbfa47 100644 --- a/collect-wireless-mac.local +++ b/collect-wireless-mac.local @@ -18,7 +18,7 @@ :foreach RegTbl in=[ / interface wireless registration-table find ] do={ :local Mac [ / interface wireless registration-table get $RegTbl mac-address ]; - :local AccessList [ :pick [ / interface wireless access-list find where mac-address=$Mac ] 0 ]; + :local AccessList ([ / interface wireless access-list find where mac-address=$Mac ]->0); :if ([ :len $AccessList ] = 0) do={ :local HostName "no dhcp lease"; :local Address "no dhcp lease"; diff --git a/collect-wireless-mac.template b/collect-wireless-mac.template index bfd0438..5a969b8 100644 --- a/collect-wireless-mac.template +++ b/collect-wireless-mac.template @@ -19,7 +19,7 @@ :foreach RegTbl in=[ / %PATH% registration-table find ] do={ :local Mac [ / %PATH% registration-table get $RegTbl mac-address ]; - :local AccessList [ :pick [ / %PATH% access-list find where mac-address=$Mac ] 0 ]; + :local AccessList ([ / %PATH% access-list find where mac-address=$Mac ]->0); :if ([ :len $AccessList ] = 0) do={ :local HostName "no dhcp lease"; :local Address "no dhcp lease";