aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGrid.Framework.Data.MySQL
diff options
context:
space:
mode:
authorAdam Frisby2007-05-04 03:52:53 +0000
committerAdam Frisby2007-05-04 03:52:53 +0000
commit32ac9530a940f8a15fa3f9eab40114473c18d3e6 (patch)
tree7251bee12a6d30ed6904dc6905bbd623d023965f /OpenGrid.Framework.Data.MySQL
parentCommitting OpenGrid.Framework.Data and MySql Adaptor - not in functional stat... (diff)
downloadopensim-SC_OLD-32ac9530a940f8a15fa3f9eab40114473c18d3e6.zip
opensim-SC_OLD-32ac9530a940f8a15fa3f9eab40114473c18d3e6.tar.gz
opensim-SC_OLD-32ac9530a940f8a15fa3f9eab40114473c18d3e6.tar.bz2
opensim-SC_OLD-32ac9530a940f8a15fa3f9eab40114473c18d3e6.tar.xz
Semi-functional (in theory!)
Diffstat (limited to 'OpenGrid.Framework.Data.MySQL')
-rw-r--r--OpenGrid.Framework.Data.MySQL/MySQLGridData.cs31
-rw-r--r--OpenGrid.Framework.Data.MySQL/MySQLManager.cs5
2 files changed, 32 insertions, 4 deletions
diff --git a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
index 65a0fff..7a78800 100644
--- a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
+++ b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
@@ -15,15 +15,40 @@ namespace OpenGrid.Framework.Data.MySQL
15 } 15 }
16 public SimProfileData GetProfileByHandle(ulong handle) 16 public SimProfileData GetProfileByHandle(ulong handle)
17 { 17 {
18 return new SimProfileData(); 18 Dictionary<string,string> param = new Dictionary<string,string>();
19 param["handle"] = handle.ToString();
20
21 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
22 System.Data.IDataReader reader = result.ExecuteReader();
23
24 SimProfileData row = database.getRow( reader );
25 reader.Close();
26 result.Dispose();
27
28 return row;
19 } 29 }
20 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) 30 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
21 { 31 {
22 return new SimProfileData(); 32 Dictionary<string, string> param = new Dictionary<string, string>();
33 param["uuid"] = uuid.ToStringHyphenated();
34
35 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
36 System.Data.IDataReader reader = result.ExecuteReader();
37
38 SimProfileData row = database.getRow(reader);
39 reader.Close();
40 result.Dispose();
41
42 return row;
23 } 43 }
24 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) 44 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
25 { 45 {
26 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 46 bool throwHissyFit = false; // Should be true by 1.0
47
48 if (throwHissyFit)
49 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
50
51 return true;
27 } 52 }
28 53
29 /// <summary> 54 /// <summary>
diff --git a/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
index 30ad314..1d912e7 100644
--- a/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
+++ b/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
@@ -9,6 +9,8 @@ using MySql.Data;
9using MySql.Data.Types; 9using MySql.Data.Types;
10using MySql.Data.MySqlClient; 10using MySql.Data.MySqlClient;
11 11
12using OpenGrid.Framework.Data;
13
12namespace OpenGrid.Framework.Data.MySQL 14namespace OpenGrid.Framework.Data.MySQL
13{ 15{
14 class MySQLManager 16 class MySQLManager
@@ -71,7 +73,8 @@ namespace OpenGrid.Framework.Data.MySQL
71 73
72 if (reader.Read()) 74 if (reader.Read())
73 { 75 {
74 //retval.regionDataURI = reader["regionDataURI"]; 76 retval.regionLocX = (uint)reader["locX"];
77 retval.regionDataURI = (string)reader["regionDataURI"];
75 78
76 } 79 }
77 else 80 else