diff options
-rw-r--r-- | ppp-model.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ppp-model.lua b/ppp-model.lua index 82acc2c..8374fe9 100644 --- a/ppp-model.lua +++ b/ppp-model.lua @@ -47,8 +47,8 @@ function read_papfiledetails() return modelfunctions.getfiledetails(papfile) end -function update_papfiledetails(filedetails) - local retval = modelfunctions.setfiledetails(filedetails, {papfile}) +function update_papfiledetails(self, filedetails) + local retval = modelfunctions.setfiledetails(self, filedetails, {papfile}) posix.chmod(papfile, "rw-------") return retval end @@ -57,8 +57,8 @@ function read_chapfiledetails() return modelfunctions.getfiledetails(chapfile) end -function update_chapfiledetails(filedetails) - local retval = modelfunctions.setfiledetails(filedetails, {chapfile}) +function update_chapfiledetails(self, filedetails) + local retval = modelfunctions.setfiledetails(self, filedetails, {chapfile}) posix.chmod(chapfile, "rw-------") return retval end @@ -73,7 +73,7 @@ function get_newpeer() return cfe({ type="group", value=newpeer, label="New Peer" }) end -function create_peer(newpeer) +function create_peer(self, newpeer) newpeer.errtxt = "Failed to create peer" local path = newpeer.value.name.value if not string.find(path, "/") then @@ -113,6 +113,6 @@ function read_peerfile(name) return modelfunctions.getfiledetails(name, fs.find_files_as_array(nil, peerspath)) end -function update_peerfile(filedetails) - return modelfunctions.setfiledetails(filedetails, fs.find_files_as_array(nil, peerspath)) +function update_peerfile(self, filedetails) + return modelfunctions.setfiledetails(self, filedetails, fs.find_files_as_array(nil, peerspath)) end |