aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite
diff options
context:
space:
mode:
authorlbsa712007-07-03 14:37:29 +0000
committerlbsa712007-07-03 14:37:29 +0000
commit9b6b6d05d45cf0f754a0b26bf6240ef50be66563 (patch)
tree8d72120aac2184c5ed4c5ab5f6b673ef496a0803 /OpenSim/Framework/Data.SQLite
parent* Completed conceptual LlsdMethod - everything resides in SimpleApp pending g... (diff)
downloadopensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.zip
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.gz
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.bz2
opensim-SC_OLD-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.xz
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r--OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteGridData.cs22
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteManager.cs7
3 files changed, 14 insertions, 17 deletions
diff --git a/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs
index f811825..9de5edb 100644
--- a/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs
@@ -1,7 +1,5 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 5// associated with an assembly.
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
index 800e26c..511c5f0 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
@@ -27,8 +27,10 @@
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data;
31using System.Security.Cryptography;
30using System.Text; 32using System.Text;
31using OpenSim.Framework.Data; 33using libsecondlife;
32 34
33namespace OpenSim.Framework.Data.SQLite 35namespace OpenSim.Framework.Data.SQLite
34{ 36{
@@ -99,8 +101,8 @@ namespace OpenSim.Framework.Data.SQLite
99 Dictionary<string, string> param = new Dictionary<string, string>(); 101 Dictionary<string, string> param = new Dictionary<string, string>();
100 param["handle"] = handle.ToString(); 102 param["handle"] = handle.ToString();
101 103
102 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); 104 IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
103 System.Data.IDataReader reader = result.ExecuteReader(); 105 IDataReader reader = result.ExecuteReader();
104 106
105 SimProfileData row = database.getRow(reader); 107 SimProfileData row = database.getRow(reader);
106 reader.Close(); 108 reader.Close();
@@ -114,13 +116,13 @@ namespace OpenSim.Framework.Data.SQLite
114 /// </summary> 116 /// </summary>
115 /// <param name="uuid">The region UUID</param> 117 /// <param name="uuid">The region UUID</param>
116 /// <returns>The sim profile</returns> 118 /// <returns>The sim profile</returns>
117 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) 119 public SimProfileData GetProfileByLLUUID(LLUUID uuid)
118 { 120 {
119 Dictionary<string, string> param = new Dictionary<string, string>(); 121 Dictionary<string, string> param = new Dictionary<string, string>();
120 param["uuid"] = uuid.ToStringHyphenated(); 122 param["uuid"] = uuid.ToStringHyphenated();
121 123
122 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); 124 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
123 System.Data.IDataReader reader = result.ExecuteReader(); 125 IDataReader reader = result.ExecuteReader();
124 126
125 SimProfileData row = database.getRow(reader); 127 SimProfileData row = database.getRow(reader);
126 reader.Close(); 128 reader.Close();
@@ -153,7 +155,7 @@ namespace OpenSim.Framework.Data.SQLite
153 /// <param name="handle">The attempted regionHandle of the challenger</param> 155 /// <param name="handle">The attempted regionHandle of the challenger</param>
154 /// <param name="authkey">The secret</param> 156 /// <param name="authkey">The secret</param>
155 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> 157 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
156 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) 158 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey)
157 { 159 {
158 bool throwHissyFit = false; // Should be true by 1.0 160 bool throwHissyFit = false; // Should be true by 1.0
159 161
@@ -174,10 +176,10 @@ namespace OpenSim.Framework.Data.SQLite
174 /// <param name="authhash"></param> 176 /// <param name="authhash"></param>
175 /// <param name="challenge"></param> 177 /// <param name="challenge"></param>
176 /// <returns></returns> 178 /// <returns></returns>
177 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) 179 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge)
178 { 180 {
179 System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); 181 SHA512Managed HashProvider = new SHA512Managed();
180 System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); 182 ASCIIEncoding TextProvider = new ASCIIEncoding();
181 183
182 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); 184 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
183 byte[] hash = HashProvider.ComputeHash(stream); 185 byte[] hash = HashProvider.ComputeHash(stream);
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
index 3397e0d..c9931ab 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
@@ -27,12 +27,9 @@
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text;
31using System.Data; 30using System.Data;
32
33using System.Data.SQLite; 31using System.Data.SQLite;
34 32using libsecondlife;
35using OpenSim.Framework.Data;
36 33
37namespace OpenSim.Framework.Data.SQLite 34namespace OpenSim.Framework.Data.SQLite
38{ 35{
@@ -105,7 +102,7 @@ namespace OpenSim.Framework.Data.SQLite
105 // Region Main 102 // Region Main
106 retval.regionHandle = (ulong)reader["regionHandle"]; 103 retval.regionHandle = (ulong)reader["regionHandle"];
107 retval.regionName = (string)reader["regionName"]; 104 retval.regionName = (string)reader["regionName"];
108 retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]); 105 retval.UUID = new LLUUID((string)reader["uuid"]);
109 106
110 // Secrets 107 // Secrets
111 retval.regionRecvKey = (string)reader["regionRecvKey"]; 108 retval.regionRecvKey = (string)reader["regionRecvKey"];