diff options
Diffstat (limited to 'OpenSim.RegionServer')
-rw-r--r-- | OpenSim.RegionServer/OpenSim.RegionServer.dll.build | 164 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSimMain.cs | 1 | ||||
-rw-r--r-- | OpenSim.RegionServer/RegionInfo.cs | 104 |
3 files changed, 123 insertions, 146 deletions
diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build index 331cfd4..cd900f5 100644 --- a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build +++ b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build | |||
@@ -1,82 +1,82 @@ | |||
1 | <?xml version="1.0" ?> | 1 | <?xml version="1.0" ?> |
2 | <project name="OpenSim.RegionServer" default="build"> | 2 | <project name="OpenSim.RegionServer" 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.RegionServer" dynamicprefix="true" > | 11 | <resources prefix="OpenSim.RegionServer" dynamicprefix="true" > |
12 | </resources> | 12 | </resources> |
13 | <sources failonempty="true"> | 13 | <sources failonempty="true"> |
14 | <include name="AgentAssetUpload.cs" /> | 14 | <include name="AgentAssetUpload.cs" /> |
15 | <include name="ConsoleCmds.cs" /> | 15 | <include name="ConsoleCmds.cs" /> |
16 | <include name="Grid.cs" /> | 16 | <include name="Grid.cs" /> |
17 | <include name="OpenSimMain.cs" /> | 17 | <include name="OpenSimMain.cs" /> |
18 | <include name="OpenSimNetworkHandler.cs" /> | 18 | <include name="OpenSimNetworkHandler.cs" /> |
19 | <include name="PacketServer.cs" /> | 19 | <include name="PacketServer.cs" /> |
20 | <include name="QueItem.cs" /> | 20 | <include name="QueItem.cs" /> |
21 | <include name="RegionInfo.cs" /> | 21 | <include name="RegionInfo.cs" /> |
22 | <include name="SimClient.cs" /> | 22 | <include name="SimClient.cs" /> |
23 | <include name="SimConsole.cs" /> | 23 | <include name="SimConsole.cs" /> |
24 | <include name="VersionInfo.cs" /> | 24 | <include name="VersionInfo.cs" /> |
25 | <include name="Assets/AssetCache.cs" /> | 25 | <include name="Assets/AssetCache.cs" /> |
26 | <include name="Assets/InventoryCache.cs" /> | 26 | <include name="Assets/InventoryCache.cs" /> |
27 | <include name="CAPS/AdminWebFront.cs" /> | 27 | <include name="CAPS/AdminWebFront.cs" /> |
28 | <include name="types/Mesh.cs" /> | 28 | <include name="types/Mesh.cs" /> |
29 | <include name="types/Triangle.cs" /> | 29 | <include name="types/Triangle.cs" /> |
30 | <include name="world/Avatar.cs" /> | 30 | <include name="world/Avatar.cs" /> |
31 | <include name="world/AvatarAnimations.cs" /> | 31 | <include name="world/AvatarAnimations.cs" /> |
32 | <include name="world/AvatarClient.cs" /> | 32 | <include name="world/AvatarClient.cs" /> |
33 | <include name="world/AvatarUpdate.cs" /> | 33 | <include name="world/AvatarUpdate.cs" /> |
34 | <include name="world/Entity.cs" /> | 34 | <include name="world/Entity.cs" /> |
35 | <include name="world/Primitive.cs" /> | 35 | <include name="world/Primitive.cs" /> |
36 | <include name="world/Primitive2.cs" /> | 36 | <include name="world/Primitive2.cs" /> |
37 | <include name="world/ScriptEngine.cs" /> | 37 | <include name="world/ScriptEngine.cs" /> |
38 | <include name="world/SurfacePatch.cs" /> | 38 | <include name="world/SurfacePatch.cs" /> |
39 | <include name="world/World.cs" /> | 39 | <include name="world/World.cs" /> |
40 | <include name="world/WorldPacketHandlers.cs" /> | 40 | <include name="world/WorldPacketHandlers.cs" /> |
41 | <include name="world/scripting/IScript.cs" /> | 41 | <include name="world/scripting/IScript.cs" /> |
42 | <include name="world/scripting/IScriptContext.cs" /> | 42 | <include name="world/scripting/IScriptContext.cs" /> |
43 | <include name="world/scripting/IScriptEntity.cs" /> | 43 | <include name="world/scripting/IScriptEntity.cs" /> |
44 | <include name="world/scripting/IScriptHandler.cs" /> | 44 | <include name="world/scripting/IScriptHandler.cs" /> |
45 | <include name="world/scripting/Script.cs" /> | 45 | <include name="world/scripting/Script.cs" /> |
46 | <include name="world/scripting/ScriptFactory.cs" /> | 46 | <include name="world/scripting/ScriptFactory.cs" /> |
47 | <include name="world/scripting/Scripts/FollowRandomAvatar.cs" /> | 47 | <include name="world/scripting/Scripts/FollowRandomAvatar.cs" /> |
48 | </sources> | 48 | </sources> |
49 | <references basedir="${project::get-base-directory()}"> | 49 | <references basedir="${project::get-base-directory()}"> |
50 | <lib> | 50 | <lib> |
51 | <include name="${project::get-base-directory()}" /> | 51 | <include name="${project::get-base-directory()}" /> |
52 | <include name="${project::get-base-directory()}/${build.dir}" /> | 52 | <include name="${project::get-base-directory()}/${build.dir}" /> |
53 | </lib> | 53 | </lib> |
54 | <include name="System.dll" /> | 54 | <include name="System.dll" /> |
55 | <include name="System.Xml.dll" /> | 55 | <include name="System.Xml.dll" /> |
56 | <include name="../bin/libsecondlife.dll" /> | 56 | <include name="../bin/libsecondlife.dll" /> |
57 | <include name="../bin/Axiom.MathLib.dll" /> | 57 | <include name="../bin/Axiom.MathLib.dll" /> |
58 | <include name="../bin/Db4objects.Db4o.dll" /> | 58 | <include name="../bin/Db4objects.Db4o.dll" /> |
59 | <include name="../bin/OpenSim.Terrain.BasicTerrain.dll" /> | 59 | <include name="../bin/OpenSim.Terrain.BasicTerrain.dll" /> |
60 | <include name="../bin/OpenSim.Framework.dll" /> | 60 | <include name="../bin/OpenSim.Framework.dll" /> |
61 | <include name="../bin/OpenSim.Framework.Console.dll" /> | 61 | <include name="../bin/OpenSim.Framework.Console.dll" /> |
62 | <include name="../bin/OpenSim.GenericConfig.Xml.dll" /> | 62 | <include name="../bin/OpenSim.GenericConfig.Xml.dll" /> |
63 | <include name="../bin/OpenSim.Physics.Manager.dll" /> | 63 | <include name="../bin/OpenSim.Physics.Manager.dll" /> |
64 | <include name="../bin/OpenSim.Servers.dll" /> | 64 | <include name="../bin/OpenSim.Servers.dll" /> |
65 | </references> | 65 | </references> |
66 | </csc> | 66 | </csc> |
67 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" /> | 67 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" /> |
68 | <mkdir dir="${project::get-base-directory()}/../bin/"/> | 68 | <mkdir dir="${project::get-base-directory()}/../bin/"/> |
69 | <copy todir="${project::get-base-directory()}/../bin/"> | 69 | <copy todir="${project::get-base-directory()}/../bin/"> |
70 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | 70 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > |
71 | <include name="*.dll"/> | 71 | <include name="*.dll"/> |
72 | <include name="*.exe"/> | 72 | <include name="*.exe"/> |
73 | </fileset> | 73 | </fileset> |
74 | </copy> | 74 | </copy> |
75 | </target> | 75 | </target> |
76 | <target name="clean"> | 76 | <target name="clean"> |
77 | <delete dir="${bin.dir}" failonerror="false" /> | 77 | <delete dir="${bin.dir}" failonerror="false" /> |
78 | <delete dir="${obj.dir}" failonerror="false" /> | 78 | <delete dir="${obj.dir}" failonerror="false" /> |
79 | </target> | 79 | </target> |
80 | <target name="doc" description="Creates documentation."> | 80 | <target name="doc" description="Creates documentation."> |
81 | </target> | 81 | </target> |
82 | </project> | 82 | </project> |
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 34fa243..d36dbfc 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs | |||
@@ -114,7 +114,6 @@ namespace OpenSim | |||
114 | } | 114 | } |
115 | m_console.WriteLine("Main.cs:Startup() - Loading configuration"); | 115 | m_console.WriteLine("Main.cs:Startup() - Loading configuration"); |
116 | this.regionData.InitConfig(this.m_sandbox, this.localConfig); | 116 | this.regionData.InitConfig(this.m_sandbox, this.localConfig); |
117 | //regionData.SimUUID = new LLUUID(localConfig.GetAttribute("SimUUID")); //don't need as regionData.SimUUID is already set through the above line | ||
118 | this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change | 117 | this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change |
119 | 118 | ||
120 | 119 | ||
diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs index cf0c075..e120198 100644 --- a/OpenSim.RegionServer/RegionInfo.cs +++ b/OpenSim.RegionServer/RegionInfo.cs | |||
@@ -1,6 +1,9 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using System.Net; | ||
5 | using System.Web; | ||
6 | using System.IO; | ||
4 | using OpenSim.Framework.Interfaces; | 7 | using OpenSim.Framework.Interfaces; |
5 | using OpenSim.Framework.Utilities; | 8 | using OpenSim.Framework.Utilities; |
6 | using libsecondlife; | 9 | using libsecondlife; |
@@ -34,7 +37,37 @@ namespace OpenSim | |||
34 | public RegionInfo() | 37 | public RegionInfo() |
35 | { | 38 | { |
36 | 39 | ||
37 | } | 40 | } |
41 | |||
42 | public void SaveToGrid() | ||
43 | { | ||
44 | string reqtext; | ||
45 | reqtext="<authkey>" + this.GridSendKey + "</authkey>"; | ||
46 | reqtext+="<sim>"; | ||
47 | reqtext+="<uuid>" + this.SimUUID.ToString() + "</uuid>"; | ||
48 | reqtext+="<regionname>" + this.RegionName + "</regionname>"; | ||
49 | reqtext+="<sim_ip>" + this.IPListenAddr + "</sim_ip>"; | ||
50 | reqtext+="<sim_port>" + this.IPListenPort.ToString() + "</sim_port>"; | ||
51 | reqtext+="<region_locx>" + this.RegionLocX.ToString() + "</region_locx>"; | ||
52 | reqtext+="<region_locy>" + this.RegionLocY.ToString() + "</region_locy>"; | ||
53 | reqtext+="<estate_id>1</estate_id>"; | ||
54 | reqtext+="</sim>"; | ||
55 | |||
56 | WebRequest GridSaveReq = WebRequest.Create(this.GridURL + "sims/" + this.SimUUID.ToString()); | ||
57 | GridSaveReq.Method = "POST"; | ||
58 | GridSaveReq.ContentType = "text/plaintext"; | ||
59 | GridSaveReq.ContentLength = reqtext.Length; | ||
60 | |||
61 | StreamWriter stOut = new StreamWriter(GridSaveReq.GetRequestStream(), System.Text.Encoding.ASCII); | ||
62 | stOut.Write(reqtext); | ||
63 | stOut.Close(); | ||
64 | |||
65 | StreamReader stIn = new StreamReader(GridSaveReq.GetResponse().GetResponseStream()); | ||
66 | string GridResponse = stIn.ReadToEnd(); | ||
67 | stIn.Close(); | ||
68 | |||
69 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse); | ||
70 | } | ||
38 | 71 | ||
39 | public void InitConfig(bool sandboxMode, IGenericConfig configData) | 72 | public void InitConfig(bool sandboxMode, IGenericConfig configData) |
40 | { | 73 | { |
@@ -122,31 +155,7 @@ namespace OpenSim | |||
122 | { | 155 | { |
123 | //shouldn't be reading this data in here, it should be up to the classes implementing the server interfaces to read what they need from the config object | 156 | //shouldn't be reading this data in here, it should be up to the classes implementing the server interfaces to read what they need from the config object |
124 | 157 | ||
125 | // Asset Server URL | 158 | //Grid Server URL |
126 | attri = ""; | ||
127 | attri = configData.GetAttribute("AssetServerURL"); | ||
128 | if (attri == "") | ||
129 | { | ||
130 | this.AssetURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Asset server URL: "); | ||
131 | configData.SetAttribute("AssetServerURL", this.AssetURL); | ||
132 | } | ||
133 | else | ||
134 | { | ||
135 | this.AssetURL = attri; | ||
136 | } | ||
137 | //Asset Server key | ||
138 | attri = ""; | ||
139 | attri = configData.GetAttribute("AssetServerKey"); | ||
140 | if (attri == "") | ||
141 | { | ||
142 | this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Asset server key: "); | ||
143 | configData.SetAttribute("AssetServerKey", this.AssetSendKey); | ||
144 | } | ||
145 | else | ||
146 | { | ||
147 | this.AssetSendKey = attri; | ||
148 | } | ||
149 | //Grid Sever URL | ||
150 | attri = ""; | 159 | attri = ""; |
151 | attri = configData.GetAttribute("GridServerURL"); | 160 | attri = configData.GetAttribute("GridServerURL"); |
152 | if (attri == "") | 161 | if (attri == "") |
@@ -158,6 +167,7 @@ namespace OpenSim | |||
158 | { | 167 | { |
159 | this.GridURL = attri; | 168 | this.GridURL = attri; |
160 | } | 169 | } |
170 | |||
161 | //Grid Send Key | 171 | //Grid Send Key |
162 | attri = ""; | 172 | attri = ""; |
163 | attri = configData.GetAttribute("GridSendKey"); | 173 | attri = configData.GetAttribute("GridSendKey"); |
@@ -170,6 +180,7 @@ namespace OpenSim | |||
170 | { | 180 | { |
171 | this.GridSendKey = attri; | 181 | this.GridSendKey = attri; |
172 | } | 182 | } |
183 | |||
173 | //Grid Receive Key | 184 | //Grid Receive Key |
174 | attri = ""; | 185 | attri = ""; |
175 | attri = configData.GetAttribute("GridRecvKey"); | 186 | attri = configData.GetAttribute("GridRecvKey"); |
@@ -181,45 +192,12 @@ namespace OpenSim | |||
181 | else | 192 | else |
182 | { | 193 | { |
183 | this.GridRecvKey = attri; | 194 | this.GridRecvKey = attri; |
184 | } | 195 | } |
185 | //User Server URL | 196 | |
186 | attri = ""; | 197 | |
187 | attri = configData.GetAttribute("UserServerURL"); | ||
188 | if (attri == "") | ||
189 | { | ||
190 | this.UserURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("User server URL: "); | ||
191 | configData.SetAttribute("UserServerURL", this.UserURL); | ||
192 | } | ||
193 | else | ||
194 | { | ||
195 | this.UserURL = attri; | ||
196 | } | ||
197 | //User Send Key | ||
198 | attri = ""; | ||
199 | attri = configData.GetAttribute("UserSendKey"); | ||
200 | if (attri == "") | ||
201 | { | ||
202 | this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server: "); | ||
203 | configData.SetAttribute("UserSendKey", this.UserSendKey); | ||
204 | } | ||
205 | else | ||
206 | { | ||
207 | this.UserSendKey = attri; | ||
208 | } | ||
209 | //User Receive Key | ||
210 | attri = ""; | ||
211 | attri = configData.GetAttribute("UserRecvKey"); | ||
212 | if (attri == "") | ||
213 | { | ||
214 | this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server: "); | ||
215 | configData.SetAttribute("UserRecvKey", this.UserRecvKey); | ||
216 | } | ||
217 | else | ||
218 | { | ||
219 | this.UserRecvKey = attri; | ||
220 | } | ||
221 | } | 198 | } |
222 | this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); | 199 | this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); |
200 | this.SaveToGrid(); | ||
223 | configData.Commit(); | 201 | configData.Commit(); |
224 | } | 202 | } |
225 | catch (Exception e) | 203 | catch (Exception e) |