From fb00ff8f05dae3c110beceb929ea036e4cd14ae1 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 23 Sep 2013 18:13:03 +0000 Subject: Change function prototypes to pass self and use self.model instead of functions table Changed the order of the first two parameters passed to validate function in provisioning_params Replaced all APP references with self, now that self is available Still need to implement swapvalidateparams script --- config/process_put.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config/process_put.lua') diff --git a/config/process_put.lua b/config/process_put.lua index 4eabb1a..1a34042 100644 --- a/config/process_put.lua +++ b/config/process_put.lua @@ -1,10 +1,10 @@ -- This is the script run to process uploaded config files -local functions, mac, data, device_id = ... +local self, mac, data, device_id = ... ---APP.logevent("got to process_put script") +--self.logevent("got to process_put script") -- Get the params -local params = functions.get_device_params(device_id) +local params = self.get_device_params(self, device_id) function process_polycom() local before, xml, after = string.match(data, "(.*.*)") @@ -18,7 +18,7 @@ function process_polycom() end -- for n,v in pairs(attrs) do --- APP.logevent("name "..n.." val "..(v or "")) +-- self.logevent("name "..n.." val "..(v or "")) -- end -- Read attributes from attrs and generate paramaters for ACF @@ -57,7 +57,7 @@ if string.match(params.value.device.label, "Polycom") then end -- Update the params -local params = functions.set_device_params(params) +local params = self.set_device_params(self, params) -- Return the updated data return data -- cgit v1.2.3