summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-04-28 12:17:44 +0000
committerTed Trask <ttrask01@yahoo.com>2012-04-28 12:17:44 +0000
commit4d34a67733a5072011de018481eae78cd248c631 (patch)
tree444a463429ccaba075518b1227724e36ae49f7a5
parent39f60af92aae372c9a386e8ecb94ee31d4ea8b25 (diff)
downloadacf-freeswitch-4d34a67733a5072011de018481eae78cd248c631.tar.bz2
acf-freeswitch-4d34a67733a5072011de018481eae78cd248c631.tar.xz
Updated for handle_form now passing self to get and set functions
-rw-r--r--freeswitch-model.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/freeswitch-model.lua b/freeswitch-model.lua
index e42fd1f..610d4df 100644
--- a/freeswitch-model.lua
+++ b/freeswitch-model.lua
@@ -29,11 +29,11 @@ get_status = function()
return modelfunctions.getstatus(processname, packagename, "Freeswitch Status")
end
-function get_startstop(clientdata)
+function get_startstop(self, clientdata)
return modelfunctions.get_startstop(processname)
end
-function startstop_service(startstop, action)
+function startstop_service(self, startstop, action)
return modelfunctions.startstop_service(startstop, action)
end
@@ -48,8 +48,8 @@ get_file = function(filename)
return modelfunctions.getfiledetails(filename, is_valid_filename)
end
-update_file = function(filedetails)
- local ret = modelfunctions.setfiledetails(filedetails, is_valid_filename)
+update_file = function(self, filedetails)
+ local ret = modelfunctions.setfiledetails(self, filedetails, is_valid_filename)
if not ret.errtxt then
posix.chmod(filedetails.value.filename.value, "rw-------")
posix.chown(filedetails.value.filename.value, posix.getpasswd("freeswitch", "uid") or 0, posix.getpasswd("freeswitch", "gid") or 0)
@@ -75,7 +75,7 @@ function getnewfile()
return cfe({ type="group", value={filename=filename}, label="Freeswitch File" })
end
-function createfile(filedetails)
+function createfile(self, filedetails)
local success = true
local path = string.match(filedetails.value.filename.value, "^%s*(.*%S)%s*$") or ""
if not string.find(path, "/") then