Change. Use only require to load function.

Fix. Remove multiple definition of same function.
This commit is contained in:
Alexey Melnichuk
2015-08-10 12:43:06 +04:00
parent 565395c44f
commit 703b61636a
64 changed files with 207 additions and 400 deletions

View File

@@ -31,16 +31,11 @@
local file = assert(io.open(tmp_file, "w"));
file:write("remove this file to stop the script");
--add the trim function
function trim(s)
return s:gsub("^%s+", ""):gsub("%s+$", "")
end
--define the trim function
require "resources.functions.trim"
--check if a file exists
function file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
require "resources.functions.file_exists"
--create the api object
api = freeswitch.API();