aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
authorSean Dague2008-05-28 17:59:46 +0000
committerSean Dague2008-05-28 17:59:46 +0000
commit89c164fbc18e082bf2d036bd2167b824e90aebc1 (patch)
tree9042b06429cb3941b04f79af084c13d022d861e7 /OpenSim/Data/SQLite
parent* Minor: Another small log adjustment (diff)
downloadopensim-SC_OLD-89c164fbc18e082bf2d036bd2167b824e90aebc1.zip
opensim-SC_OLD-89c164fbc18e082bf2d036bd2167b824e90aebc1.tar.gz
opensim-SC_OLD-89c164fbc18e082bf2d036bd2167b824e90aebc1.tar.bz2
opensim-SC_OLD-89c164fbc18e082bf2d036bd2167b824e90aebc1.tar.xz
let Grid Servers specify a connect string in their configuration.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteGridData.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteManager.cs14
2 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteGridData.cs b/OpenSim/Data/SQLite/SQLiteGridData.cs
index 989ec77..7c5bb0c 100644
--- a/OpenSim/Data/SQLite/SQLiteGridData.cs
+++ b/OpenSim/Data/SQLite/SQLiteGridData.cs
@@ -48,9 +48,9 @@ namespace OpenSim.Data.SQLite
48 /// <summary> 48 /// <summary>
49 /// Initialises the Grid Interface 49 /// Initialises the Grid Interface
50 /// </summary> 50 /// </summary>
51 override public void Initialise() 51 override public void Initialise(string connect)
52 { 52 {
53 database = new SQLiteManager("localhost", "db", "user", "password", "false"); 53 database = new SQLiteManager(connect);
54 } 54 }
55 55
56 /// <summary> 56 /// <summary>
diff --git a/OpenSim/Data/SQLite/SQLiteManager.cs b/OpenSim/Data/SQLite/SQLiteManager.cs
index e1d2cdf..4d39527 100644
--- a/OpenSim/Data/SQLite/SQLiteManager.cs
+++ b/OpenSim/Data/SQLite/SQLiteManager.cs
@@ -49,11 +49,21 @@ namespace OpenSim.Data.SQLite
49 /// <param name="username">The username logging into the database</param> 49 /// <param name="username">The username logging into the database</param>
50 /// <param name="password">The password for the user logging in</param> 50 /// <param name="password">The password for the user logging in</param>
51 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param> 51 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
52 public SQLiteManager(string hostname, string database, string username, string password, string cpooling) 52 public SQLiteManager(string connect)
53 { 53 {
54 try 54 try
55 { 55 {
56 string connectionString = "URI=file:GridServerSqlite.db;"; 56 string connectionString = String.Empty;
57 if (connect != String.Empty)
58 {
59 connectionString = connect;
60 }
61 else
62 {
63 m_log.Warn("[SQLITE] grid db not specified, using default");
64 connectionString = "URI=file:GridServerSqlite.db;";
65 }
66
57 dbcon = new SQLiteConnection(connectionString); 67 dbcon = new SQLiteConnection(connectionString);
58 68
59 dbcon.Open(); 69 dbcon.Open();