From 3dd98a112f4308532d768943690b13c403dff68b Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 23 Apr 2008 20:48:23 +0000 Subject: allow for Inventory database source to be specified in main configs. This works with sqlite and nhibernate backends, and stays with default seperate ini files for mysql and mssql until someone writes those. --- OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'OpenSim/Data/SQLite/SQLiteInventoryStore.cs') diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 442ba39..2eb0ad5 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs @@ -50,17 +50,13 @@ namespace OpenSim.Data.SQLite /// /// Initialises the interface /// - public void Initialise() + public void Initialise(string dbconnect) { - Initialise("inventoryStore.db", "inventoryDatabase"); - } - - public void Initialise(string dbfile, string dbname) - { - string connectionString = "URI=file:" + dbfile + ",version=3"; - - m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile); - SqliteConnection conn = new SqliteConnection(connectionString); + if (dbconnect == string.Empty) { + dbconnect = "URI=file:inventoryStore.db,version=3"; + } + m_log.Info("[Inventory]: Sqlite - connecting: " + dbconnect); + SqliteConnection conn = new SqliteConnection(dbconnect); conn.Open(); -- cgit v1.1