aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs (renamed from OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs)25
1 files changed, 15 insertions, 10 deletions
diff --git a/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs
index 4a5dc2e..c64830a 100644
--- a/OpenSim/Data/SQLiteNG/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs
@@ -31,9 +31,9 @@ using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using OpenMetaverse; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using Mono.Data.Sqlite; 34using Mono.Data.SqliteClient;
35 35
36namespace OpenSim.Data.SQLiteNG 36namespace OpenSim.Data.SQLiteLegacy
37{ 37{
38 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData 38 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
39 { 39 {
@@ -56,8 +56,13 @@ namespace OpenSim.Data.SQLiteNG
56 m_Connection = new SqliteConnection(connectionString); 56 m_Connection = new SqliteConnection(connectionString);
57 m_Connection.Open(); 57 m_Connection.Open();
58 58
59 Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore"); 59 using (SqliteConnection dbcon = (SqliteConnection)((ICloneable)m_Connection).Clone())
60 m.Update(); 60 {
61 dbcon.Open();
62 Migration m = new Migration(dbcon, GetType().Assembly, "AuthStore");
63 m.Update();
64 dbcon.Close();
65 }
61 66
62 m_initialized = true; 67 m_initialized = true;
63 } 68 }
@@ -108,7 +113,7 @@ namespace OpenSim.Data.SQLiteNG
108 } 113 }
109 finally 114 finally
110 { 115 {
111 //CloseCommand(cmd); 116 CloseCommand(cmd);
112 } 117 }
113 118
114 return null; 119 return null;
@@ -151,14 +156,14 @@ namespace OpenSim.Data.SQLiteNG
151 { 156 {
152 if (ExecuteNonQuery(cmd, m_Connection) < 1) 157 if (ExecuteNonQuery(cmd, m_Connection) < 1)
153 { 158 {
154 //CloseCommand(cmd); 159 CloseCommand(cmd);
155 return false; 160 return false;
156 } 161 }
157 } 162 }
158 catch (Exception e) 163 catch (Exception e)
159 { 164 {
160 Console.WriteLine(e.ToString()); 165 Console.WriteLine(e.ToString());
161 //CloseCommand(cmd); 166 CloseCommand(cmd);
162 return false; 167 return false;
163 } 168 }
164 } 169 }
@@ -179,19 +184,19 @@ namespace OpenSim.Data.SQLiteNG
179 { 184 {
180 if (ExecuteNonQuery(cmd, m_Connection) < 1) 185 if (ExecuteNonQuery(cmd, m_Connection) < 1)
181 { 186 {
182 //CloseCommand(cmd); 187 CloseCommand(cmd);
183 return false; 188 return false;
184 } 189 }
185 } 190 }
186 catch (Exception e) 191 catch (Exception e)
187 { 192 {
188 Console.WriteLine(e.ToString()); 193 Console.WriteLine(e.ToString());
189 //CloseCommand(cmd); 194 CloseCommand(cmd);
190 return false; 195 return false;
191 } 196 }
192 } 197 }
193 198
194 //CloseCommand(cmd); 199 CloseCommand(cmd);
195 200
196 return true; 201 return true;
197 } 202 }