Use the switch database defined in config.conf
This commit is contained in:
parent
d9ba8b8880
commit
0a6148bbc4
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue