summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-20 00:14:53 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-04 16:53:50 +0000
commitcda39b19d7cf3b70c432e7a61c9a4fc372d1ca7f (patch)
tree7291a6659ae0e07b9562f88c8ddca4f1b0750a46
parent44560e46a781bd906c6b64966f3e4c58162df767 (diff)
downloadacf-kamailio-cda39b19d7cf3b70c432e7a61c9a4fc372d1ca7f.tar.bz2
acf-kamailio-cda39b19d7cf3b70c432e7a61c9a4fc372d1ca7f.tar.xz
Remove all calls to 'module' in preparation for move to Lua 5.2
Use mymodule parameter for module definition. This was also helpful in revealing places where the code relied on the global environment. (cherry picked from commit 777416fb5b0909661323cf4cb23af45e917cdfd6) Conflicts: kamailio-controller.lua kamailio-model.lua
-rw-r--r--kamailio-model.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/kamailio-model.lua b/kamailio-model.lua
index 103890f..1fa9c57 100644
--- a/kamailio-model.lua
+++ b/kamailio-model.lua
@@ -244,11 +244,11 @@ function mymodule.delete_user(self, user)
end
function mymodule.get_user(self, clientdata)
- local user = get_new_user()
+ local user = mymodule.get_new_user()
user.value.username.value = clientdata.username or ""
user.value.username.errtxt = "Invalid user"
user.value.username.readonly = true
- local users = list_users()
+ local users = mymodule.list_users()
for i,u in ipairs(users.value) do
if u.username == clientdata.username then
user.value.username.errtxt = nil