aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework
diff options
context:
space:
mode:
authorgareth2007-04-11 08:51:39 +0000
committergareth2007-04-11 08:51:39 +0000
commit950389a2633034fa8ff93dfa97dc14db46d40efc (patch)
treedc3b3b79cf90c40eb06be9bfff5cad7f366b6de5 /OpenSim.Framework
parent* nant building again (diff)
downloadopensim-SC_OLD-950389a2633034fa8ff93dfa97dc14db46d40efc.zip
opensim-SC_OLD-950389a2633034fa8ff93dfa97dc14db46d40efc.tar.gz
opensim-SC_OLD-950389a2633034fa8ff93dfa97dc14db46d40efc.tar.bz2
opensim-SC_OLD-950389a2633034fa8ff93dfa97dc14db46d40efc.tar.xz
Added POST handler for /sims/ in the grid server
Removed asset/user config in grid mode in the region server Added "create user" command in the user server console Begun buggy code to send sim details to the grid at startup Drank whole pack of red bull in one night and made stupid jokes in SVN logs and C# comments
Diffstat (limited to 'OpenSim.Framework')
-rw-r--r--OpenSim.Framework/OpenSim.Framework.dll.build134
-rw-r--r--OpenSim.Framework/SimProfile.cs35
-rw-r--r--OpenSim.Framework/UserProfileManager.cs8
3 files changed, 105 insertions, 72 deletions
diff --git a/OpenSim.Framework/OpenSim.Framework.dll.build b/OpenSim.Framework/OpenSim.Framework.dll.build
index 89010d2..b351625 100644
--- a/OpenSim.Framework/OpenSim.Framework.dll.build
+++ b/OpenSim.Framework/OpenSim.Framework.dll.build
@@ -1,67 +1,67 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Framework" default="build"> 2<project name="OpenSim.Framework" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}"> 6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}"> 7 <fileset basedir="${project::get-base-directory()}">
8 </fileset> 8 </fileset>
9 </copy> 9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> 10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenSim.Framework" dynamicprefix="true" > 11 <resources prefix="OpenSim.Framework" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AgentCiruitData.cs" /> 14 <include name="AgentCiruitData.cs" />
15 <include name="AgentInventory.cs" /> 15 <include name="AgentInventory.cs" />
16 <include name="AssetBase.cs" /> 16 <include name="AssetBase.cs" />
17 <include name="BlockingQueue.cs" /> 17 <include name="BlockingQueue.cs" />
18 <include name="HeightMapGenHills.cs" /> 18 <include name="HeightMapGenHills.cs" />
19 <include name="IAssetServer.cs" /> 19 <include name="IAssetServer.cs" />
20 <include name="IConfig.cs" /> 20 <include name="IConfig.cs" />
21 <include name="IGenericConfig.cs" /> 21 <include name="IGenericConfig.cs" />
22 <include name="IGridConfig.cs" /> 22 <include name="IGridConfig.cs" />
23 <include name="IGridServer.cs" /> 23 <include name="IGridServer.cs" />
24 <include name="ILocalStorage.cs" /> 24 <include name="ILocalStorage.cs" />
25 <include name="IUserConfig.cs" /> 25 <include name="IUserConfig.cs" />
26 <include name="IUserServer.cs" /> 26 <include name="IUserServer.cs" />
27 <include name="LocalGridBase.cs" /> 27 <include name="LocalGridBase.cs" />
28 <include name="Login.cs" /> 28 <include name="Login.cs" />
29 <include name="LoginService.cs" /> 29 <include name="LoginService.cs" />
30 <include name="NeighbourInfo.cs" /> 30 <include name="NeighbourInfo.cs" />
31 <include name="PrimData.cs" /> 31 <include name="PrimData.cs" />
32 <include name="RemoteGridBase.cs" /> 32 <include name="RemoteGridBase.cs" />
33 <include name="SimProfile.cs" /> 33 <include name="SimProfile.cs" />
34 <include name="SimProfileBase.cs" /> 34 <include name="SimProfileBase.cs" />
35 <include name="UserProfile.cs" /> 35 <include name="UserProfile.cs" />
36 <include name="UserProfileManager.cs" /> 36 <include name="UserProfileManager.cs" />
37 <include name="UserProfileManagerBase.cs" /> 37 <include name="UserProfileManagerBase.cs" />
38 <include name="Util.cs" /> 38 <include name="Util.cs" />
39 <include name="Properties/AssemblyInfo.cs" /> 39 <include name="Properties/AssemblyInfo.cs" />
40 </sources> 40 </sources>
41 <references basedir="${project::get-base-directory()}"> 41 <references basedir="${project::get-base-directory()}">
42 <lib> 42 <lib>
43 <include name="${project::get-base-directory()}" /> 43 <include name="${project::get-base-directory()}" />
44 <include name="${project::get-base-directory()}/${build.dir}" /> 44 <include name="${project::get-base-directory()}/${build.dir}" />
45 </lib> 45 </lib>
46 <include name="System.dll" /> 46 <include name="System.dll" />
47 <include name="System.Xml.dll" /> 47 <include name="System.Xml.dll" />
48 <include name="../bin/libsecondlife.dll" /> 48 <include name="../bin/libsecondlife.dll" />
49 <include name="../bin/Db4objects.Db4o.dll" /> 49 <include name="../bin/Db4objects.Db4o.dll" />
50 </references> 50 </references>
51 </csc> 51 </csc>
52 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" /> 52 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
53 <mkdir dir="${project::get-base-directory()}/../bin/"/> 53 <mkdir dir="${project::get-base-directory()}/../bin/"/>
54 <copy todir="${project::get-base-directory()}/../bin/"> 54 <copy todir="${project::get-base-directory()}/../bin/">
55 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 55 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
56 <include name="*.dll"/> 56 <include name="*.dll"/>
57 <include name="*.exe"/> 57 <include name="*.exe"/>
58 </fileset> 58 </fileset>
59 </copy> 59 </copy>
60 </target> 60 </target>
61 <target name="clean"> 61 <target name="clean">
62 <delete dir="${bin.dir}" failonerror="false" /> 62 <delete dir="${bin.dir}" failonerror="false" />
63 <delete dir="${obj.dir}" failonerror="false" /> 63 <delete dir="${obj.dir}" failonerror="false" />
64 </target> 64 </target>
65 <target name="doc" description="Creates documentation."> 65 <target name="doc" description="Creates documentation.">
66 </target> 66 </target>
67</project> 67</project>
diff --git a/OpenSim.Framework/SimProfile.cs b/OpenSim.Framework/SimProfile.cs
index ac4cf9e..fd130f0 100644
--- a/OpenSim.Framework/SimProfile.cs
+++ b/OpenSim.Framework/SimProfile.cs
@@ -16,11 +16,43 @@ namespace OpenSim.Framework.Sims
16 { 16 {
17 Hashtable GridReqParams = new Hashtable(); 17 Hashtable GridReqParams = new Hashtable();
18 GridReqParams["region_handle"] = region_handle.ToString(); 18 GridReqParams["region_handle"] = region_handle.ToString();
19 GridReqParams["authkey"] = SendKey;
20 ArrayList SendParams = new ArrayList();
21 SendParams.Add(GridReqParams);
22 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
23
24 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
25
26 Hashtable RespData = (Hashtable)GridResp.Value;
27 this.UUID = new LLUUID((string)RespData["UUID"]);
28 this.regionhandle = (ulong)Convert.ToUInt64(RespData["regionhandle"]);
29 this.regionname = (string)RespData["regionname"];
30 this.sim_ip = (string)RespData["sim_ip"];
31 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
32 this.caps_url = (string)RespData["caps_url"];
33 this.RegionLocX = (uint)Convert.ToUInt32(RespData["RegionLocX"]);
34 this.RegionLocY = (uint)Convert.ToUInt32(RespData["RegionLocY"]);
35 this.sendkey = (string)RespData["sendkey"];
36 this.recvkey = (string)RespData["recvkey"];
37 }
38 catch (Exception e)
39 {
40 Console.WriteLine(e.ToString());
41 }
42 return this;
43 }
44
45 public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
46 {
47 try
48 {
49 Hashtable GridReqParams = new Hashtable();
50 GridReqParams["UUID"] = UUID.ToString();
19 GridReqParams["caller"] = "userserver"; 51 GridReqParams["caller"] = "userserver";
20 GridReqParams["authkey"] = SendKey; 52 GridReqParams["authkey"] = SendKey;
21 ArrayList SendParams = new ArrayList(); 53 ArrayList SendParams = new ArrayList();
22 SendParams.Add(GridReqParams); 54 SendParams.Add(GridReqParams);
23 XmlRpcRequest GridReq = new XmlRpcRequest("get_sim_info", SendParams); 55 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
24 56
25 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000); 57 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
26 58
@@ -42,6 +74,7 @@ namespace OpenSim.Framework.Sims
42 } 74 }
43 return this; 75 return this;
44 } 76 }
77
45 78
46 public SimProfile() 79 public SimProfile()
47 { 80 {
diff --git a/OpenSim.Framework/UserProfileManager.cs b/OpenSim.Framework/UserProfileManager.cs
index d474834..38ca5df 100644
--- a/OpenSim.Framework/UserProfileManager.cs
+++ b/OpenSim.Framework/UserProfileManager.cs
@@ -90,8 +90,8 @@ namespace OpenSim.Framework.User
90 90
91 LLUUID AgentID = TheUser.UUID; 91 LLUUID AgentID = TheUser.UUID;
92 TheUser.InitSessionData(); 92 TheUser.InitSessionData();
93 // SimProfile SimInfo = new SimProfile(); 93 SimProfile SimInfo = new SimProfile();
94 // SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey); 94 SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
95 95
96 96
97 Hashtable GlobalT = new Hashtable(); 97 Hashtable GlobalT = new Hashtable();
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.User
146 InitialOutfit.Add(InitialOutfitHash); 146 InitialOutfit.Add(InitialOutfitHash);
147 147
148 uint circode = (uint)(Util.RandomClass.Next()); 148 uint circode = (uint)(Util.RandomClass.Next());
149 //TheUser.AddSimCircuit(circode, SimInfo.UUID); 149 TheUser.AddSimCircuit(circode, SimInfo.UUID);
150 150
151 responseData["last_name"] = TheUser.lastname; 151 responseData["last_name"] = TheUser.lastname;
152 responseData["ui-config"] = ui_config; 152 responseData["ui-config"] = ui_config;
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.User
181 181
182 this.CustomiseResponse(ref responseData, TheUser); 182 this.CustomiseResponse(ref responseData, TheUser);
183 response.Value = responseData; 183 response.Value = responseData;
184 //TheUser.SendDataToSim(SimInfo); 184 // TheUser.SendDataToSim(SimInfo);
185 185
186 186
187 187