Add debug info and change method to access the table

Changing the method to access the table with dot notation is just a style should work either way.
This commit is contained in:
FusionPBX 2023-02-07 22:47:03 -07:00 committed by GitHub
parent 09c41b88ef
commit aacb232fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -2,8 +2,10 @@
--connect to the database
function database_handle(t)
if (t == "system") then
return freeswitch.Dbh(database["system"]);
--freeswitch.consoleLog("notice","database.switch " .. database.system .. "\n");
return freeswitch.Dbh(database.system);
elseif (t == "switch") then
return freeswitch.Dbh(database["switch"]);
--freeswitch.consoleLog("notice","database.switch " .. trim(database.switch) .. "\n");
return freeswitch.Dbh(database.switch);
end
end
end