diff options
author | Adam Frisby | 2007-05-04 03:52:53 +0000 |
---|---|---|
committer | Adam Frisby | 2007-05-04 03:52:53 +0000 |
commit | 32ac9530a940f8a15fa3f9eab40114473c18d3e6 (patch) | |
tree | 7251bee12a6d30ed6904dc6905bbd623d023965f /OpenGrid.Framework.Data.MySQL | |
parent | Committing OpenGrid.Framework.Data and MySql Adaptor - not in functional stat... (diff) | |
download | opensim-SC-32ac9530a940f8a15fa3f9eab40114473c18d3e6.zip opensim-SC-32ac9530a940f8a15fa3f9eab40114473c18d3e6.tar.gz opensim-SC-32ac9530a940f8a15fa3f9eab40114473c18d3e6.tar.bz2 opensim-SC-32ac9530a940f8a15fa3f9eab40114473c18d3e6.tar.xz |
Semi-functional (in theory!)
Diffstat (limited to 'OpenGrid.Framework.Data.MySQL')
-rw-r--r-- | OpenGrid.Framework.Data.MySQL/MySQLGridData.cs | 31 | ||||
-rw-r--r-- | OpenGrid.Framework.Data.MySQL/MySQLManager.cs | 5 |
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; | |||
9 | using MySql.Data.Types; | 9 | using MySql.Data.Types; |
10 | using MySql.Data.MySqlClient; | 10 | using MySql.Data.MySqlClient; |
11 | 11 | ||
12 | using OpenGrid.Framework.Data; | ||
13 | |||
12 | namespace OpenGrid.Framework.Data.MySQL | 14 | namespace 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 |