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

@@ -34,7 +34,7 @@
--connect to the database
--dbh = freeswitch.Dbh("core:core"); -- when using sqlite
dbh = freeswitch.Dbh("sqlite://"..database_dir.."/park.db");
--dofile(scripts_dir.."/resources/functions/database_handle.lua");
--require "resources.functions.database_handle";
--get the argv values
script_name = argv[0];
@@ -48,10 +48,8 @@
--prepare the api
api = freeswitch.API();
--add a trim function
function trim (s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
--define the trim function
require "resources.functions.trim";
--monitor the parking lot if the call has hungup send a terminated event, and delete from the db
x = 0