Use the switch database defined in config.conf
This commit is contained in:
@@ -18,11 +18,7 @@ FsDatabase._backend_name = 'native'
|
|||||||
function FsDatabase.new(name)
|
function FsDatabase.new(name)
|
||||||
local dbh = assert(name)
|
local dbh = assert(name)
|
||||||
if type(name) == 'string' then
|
if type(name) == 'string' then
|
||||||
if name == 'switch' and file_exists(database_dir.."/core.db") then
|
dbh = database_handle(name)
|
||||||
dbh = freeswitch.Dbh("sqlite://"..database_dir.."/core.db")
|
|
||||||
else
|
|
||||||
dbh = database_handle(name)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
assert(dbh:connected())
|
assert(dbh:connected())
|
||||||
|
|
||||||
@@ -60,4 +56,4 @@ end
|
|||||||
end
|
end
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
return FsDatabase
|
return FsDatabase
|
||||||
|
|||||||
Reference in New Issue
Block a user