aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-05-04 03:52:53 +0000
committerAdam Frisby2007-05-04 03:52:53 +0000
commit32ac9530a940f8a15fa3f9eab40114473c18d3e6 (patch)
tree7251bee12a6d30ed6904dc6905bbd623d023965f
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!)
-rw-r--r--OpenGrid.Framework.Data.MySQL/MySQLGridData.cs31
-rw-r--r--OpenGrid.Framework.Data.MySQL/MySQLManager.cs5
-rw-r--r--OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj1
3 files changed, 33 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
diff --git a/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj b/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
index 2be7ea9..c4a3e28 100644
--- a/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
+++ b/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
@@ -40,6 +40,7 @@
40 <Compile Include="GridData.cs" /> 40 <Compile Include="GridData.cs" />
41 <Compile Include="Properties\AssemblyInfo.cs" /> 41 <Compile Include="Properties\AssemblyInfo.cs" />
42 <Compile Include="SimProfileData.cs" /> 42 <Compile Include="SimProfileData.cs" />
43 <Compile Include="UserProfileData.cs" />
43 </ItemGroup> 44 </ItemGroup>
44 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 45 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
45 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 46 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.