diff options
Diffstat (limited to 'tcpproxy-model.lua')
-rw-r--r-- | tcpproxy-model.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tcpproxy-model.lua b/tcpproxy-model.lua index 001905d..75d5c7b 100644 --- a/tcpproxy-model.lua +++ b/tcpproxy-model.lua @@ -188,11 +188,11 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -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 @@ -204,8 +204,8 @@ function getconfigfile() return modelfunctions.getfiledetails(configfile) end -function setconfigfile(filedetails) - return modelfunctions.setfiledetails(filedetails, {configfile}) +function setconfigfile(self, filedetails) + return modelfunctions.setfiledetails(self, filedetails, {configfile}) end function getsmtpstatus() @@ -283,7 +283,7 @@ function readsmtpentry(ipaddr) return cfe({ type="group", value={ipaddr=ipaddrcfe, server=server, addressonly=addressonly, domain=domain, optionalserver=optionalserver, optionalrewritelist=optionalrewritelist, senderlistfile=senderlistfile, rcptlistfile=rcptlistfile}, label="SMTP Proxy Entry" }) end -function updatesmtpentry(entry) +function updatesmtpentry(self, entry) local success, entry = validatesmtpentry(entry) if success then @@ -353,7 +353,7 @@ function getnewsmtpfile() return cfe({ type="group", value={filename=filename}, label="SMTP Proxy File" }) end -function createsmtpfile(filedetails) +function createsmtpfile(self, filedetails) local success = true if not validator.is_valid_filename(filedetails.value.filename.value, smtpdirectory) then @@ -380,8 +380,8 @@ function readsmtpfile(filename) return modelfunctions.getfiledetails(filename, function(filename) return validator.is_valid_filename(filename, smtpdirectory) end) end -function updatesmtpfile(filedetails) - return modelfunctions.setfiledetails(filedetails, function(filename) return validator.is_valid_filename(filename, smtpdirectory) end) +function updatesmtpfile(self, filedetails) + return modelfunctions.setfiledetails(self, filedetails, function(filename) return validator.is_valid_filename(filename, smtpdirectory) end) end function delsmtpfile(filename) |