Use the switch database defined in config.conf

This commit is contained in:
FusionPBX 2023-02-01 19:51:33 -07:00 committed by GitHub
parent d9ba8b8880
commit 0a6148bbc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -18,11 +18,7 @@ FsDatabase._backend_name = 'native'
function FsDatabase.new(name)
local dbh = assert(name)
if type(name) == 'string' then
if name == 'switch' and file_exists(database_dir.."/core.db") then
dbh = freeswitch.Dbh("sqlite://"..database_dir.."/core.db")
else
dbh = database_handle(name)
end
dbh = database_handle(name)
end
assert(dbh:connected())
@ -60,4 +56,4 @@ end
end
-----------------------------------------------------------
return FsDatabase
return FsDatabase