aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/IGridServices.cs5
-rw-r--r--OpenSim/Framework/General/Types/RegionInfo.cs102
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs1
-rw-r--r--OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs2
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs2
-rw-r--r--OpenSim/Region/Communications/Local/LocalBackEndServices.cs15
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs54
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs33
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs2
14 files changed, 148 insertions, 82 deletions
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
index d538e23..4167b65 100644
--- a/OpenSim/Framework/Communications/IGridServices.cs
+++ b/OpenSim/Framework/Communications/IGridServices.cs
@@ -27,6 +27,9 @@
27*/ 27*/
28 28
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net;
31using libsecondlife;
32
30using OpenSim.Framework.Types; 33using OpenSim.Framework.Types;
31 34
32namespace OpenSim.Framework.Communications 35namespace OpenSim.Framework.Communications
@@ -34,7 +37,7 @@ namespace OpenSim.Framework.Communications
34 public interface IGridServices 37 public interface IGridServices
35 { 38 {
36 RegionCommsListener RegisterRegion(RegionInfo regionInfos); 39 RegionCommsListener RegisterRegion(RegionInfo regionInfos);
37 List<RegionInfo> RequestNeighbours(RegionInfo regionInfo); 40 List<SimpleRegionInfo> RequestNeighbours(uint x, uint y);
38 RegionInfo RequestNeighbourInfo(ulong regionHandle); 41 RegionInfo RequestNeighbourInfo(ulong regionHandle);
39 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); 42 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
40 } 43 }
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs
index 5054510..77109aa 100644
--- a/OpenSim/Framework/General/Types/RegionInfo.cs
+++ b/OpenSim/Framework/General/Types/RegionInfo.cs
@@ -40,20 +40,51 @@ using OpenSim.Framework.Configuration;
40 40
41namespace OpenSim.Framework.Types 41namespace OpenSim.Framework.Types
42{ 42{
43 public class RegionInfo 43 public class SimpleRegionInfo
44 { 44 {
45 public LLUUID SimUUID = new LLUUID(); 45 public SimpleRegionInfo()
46 public string RegionName = ""; 46 {
47 }
47 48
48 private IPEndPoint m_internalEndPoint; 49 public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
49 public IPEndPoint InternalEndPoint 50 {
51
52 m_regionLocX = regionLocX;
53 m_regionLocY = regionLocY;
54
55 m_internalEndPoint = internalEndPoint;
56 m_externalHostName = externalUri;
57 }
58
59 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port)
60 {
61
62 m_regionLocX = regionLocX;
63 m_regionLocY = regionLocY;
64
65 m_externalHostName = externalUri;
66
67 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port);
68 }
69
70 public LLUUID RegionID = new LLUUID();
71
72 private uint m_remotingPort;
73 public uint RemotingPort
50 { 74 {
51 get 75 get
52 { 76 {
53 return m_internalEndPoint; 77 return m_remotingPort;
78 }
79 set
80 {
81 m_remotingPort = value;
54 } 82 }
55 } 83 }
56 84
85 public string RemotingAddress;
86
87
57 public IPEndPoint ExternalEndPoint 88 public IPEndPoint ExternalEndPoint
58 { 89 {
59 get 90 get
@@ -86,9 +117,14 @@ namespace OpenSim.Framework.Types
86 117
87 return new IPEndPoint(ia, m_internalEndPoint.Port); 118 return new IPEndPoint(ia, m_internalEndPoint.Port);
88 } 119 }
120
121 set
122 {
123 m_externalHostName = value.ToString();
124 }
89 } 125 }
90 126
91 private string m_externalHostName; 127 protected string m_externalHostName;
92 public string ExternalHostName 128 public string ExternalHostName
93 { 129 {
94 get 130 get
@@ -97,51 +133,45 @@ namespace OpenSim.Framework.Types
97 } 133 }
98 } 134 }
99 135
100 private uint? m_regionLocX; 136 protected IPEndPoint m_internalEndPoint;
101 public uint RegionLocX 137 public IPEndPoint InternalEndPoint
102 { 138 {
103 get 139 get
104 { 140 {
105 return m_regionLocX.Value; 141 return m_internalEndPoint;
106 } 142 }
107 } 143 }
108 144
109 private uint? m_regionLocY; 145 protected uint? m_regionLocX;
110 public uint RegionLocY 146 public uint RegionLocX
111 { 147 {
112 get 148 get
113 { 149 {
114 return m_regionLocY.Value; 150 return m_regionLocX.Value;
115 } 151 }
116 } 152 }
117 153
118 private ulong? m_regionHandle; 154 protected uint? m_regionLocY;
119 public ulong RegionHandle 155 public uint RegionLocY
120 { 156 {
121 get 157 get
122 { 158 {
123 if (!m_regionHandle.HasValue) 159 return m_regionLocY.Value;
124 {
125 m_regionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
126 }
127
128 return m_regionHandle.Value;
129 } 160 }
130 } 161 }
131 162
132 private uint m_remotingPort; 163 public ulong RegionHandle
133 public uint RemotingPort
134 { 164 {
135 get 165 get
136 { 166 {
137 return m_remotingPort; 167 return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
138 }
139 set
140 {
141 m_remotingPort = value;
142 } 168 }
143 } 169 }
144 public string RemotingAddress; 170 }
171
172 public class RegionInfo : SimpleRegionInfo
173 {
174 public string RegionName = "";
145 175
146 public string DataStore = ""; 176 public string DataStore = "";
147 public bool isSandbox = false; 177 public bool isSandbox = false;
@@ -161,15 +191,11 @@ namespace OpenSim.Framework.Types
161 configMember.performConfigurationRetrieve(); 191 configMember.performConfigurationRetrieve();
162 } 192 }
163 193
164 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 194 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) :
195 base(regionLocX, regionLocY, internalEndPoint, externalUri)
165 { 196 {
166 197
167 estateSettings = new EstateSettings(); 198 estateSettings = new EstateSettings();
168 m_regionLocX = regionLocX;
169 m_regionLocY = regionLocY;
170
171 m_internalEndPoint = internalEndPoint;
172 m_externalHostName = externalUri;
173 } 199 }
174 200
175 public void LoadFromNiniSource(IConfigSource source) 201 public void LoadFromNiniSource(IConfigSource source)
@@ -180,7 +206,7 @@ namespace OpenSim.Framework.Types
180 public void LoadFromNiniSource(IConfigSource source, string sectionName) 206 public void LoadFromNiniSource(IConfigSource source, string sectionName)
181 { 207 {
182 string errorMessage = ""; 208 string errorMessage = "";
183 this.SimUUID = new LLUUID(source.Configs[sectionName].GetString("sim_UUID", LLUUID.Random().ToStringHyphenated())); 209 this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated()));
184 this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); 210 this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test");
185 this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); 211 this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000"));
186 this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); 212 this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000"));
@@ -220,7 +246,7 @@ namespace OpenSim.Framework.Types
220 246
221 public void loadConfigurationOptions() 247 public void loadConfigurationOptions()
222 { 248 {
223 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Simulator (Default is recommended, random UUID)", LLUUID.Random().ToString(), true); 249 configMember.addConfigurationOption("Region_ID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Simulator (Default is recommended, random UUID)", LLUUID.Random().ToString(), true);
224 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Simulator Name", "OpenSim Test", false); 250 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Simulator Name", "OpenSim Test", false);
225 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false); 251 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false);
226 configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false); 252 configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false);
@@ -238,7 +264,7 @@ namespace OpenSim.Framework.Types
238 switch (configuration_key) 264 switch (configuration_key)
239 { 265 {
240 case "sim_UUID": 266 case "sim_UUID":
241 this.SimUUID = (LLUUID)configuration_result; 267 this.RegionID = (LLUUID)configuration_result;
242 break; 268 break;
243 case "sim_name": 269 case "sim_name":
244 this.RegionName = (string)configuration_result; 270 this.RegionName = (string)configuration_result;
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 81197fd..9800b74 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -482,6 +482,7 @@ namespace OpenSim.Grid.GridServer
482 simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString(); 482 simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString();
483 simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString(); 483 simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString();
484 simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated(); 484 simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated();
485 simProfileBlock["remoting_port"] = aSim.Value.remotingPort;
485 486
486 simProfileList.Add(simProfileBlock); 487 simProfileList.Add(simProfileBlock);
487 } 488 }
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 90fe2cf..e5728fe 100644
--- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -1168,7 +1168,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
1168 if (dynamicID == "") 1168 if (dynamicID == "")
1169 { 1169 {
1170 IDynamicTextureManager textureManager = this.World.RequestModuleInterface<IDynamicTextureManager>(); 1170 IDynamicTextureManager textureManager = this.World.RequestModuleInterface<IDynamicTextureManager>();
1171 LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.SimUUID, this.m_host.UUID, contentType, url, extraParams, timer); 1171 LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, this.m_host.UUID, contentType, url, extraParams, timer);
1172 return createdTexture.ToStringHyphenated(); 1172 return createdTexture.ToStringHyphenated();
1173 } 1173 }
1174 else 1174 else
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index e526f73..d92127f 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -519,7 +519,7 @@ namespace OpenSim.Region.ClientStack
519 { 519 {
520 AssetLandmark lm = new AssetLandmark(lma); 520 AssetLandmark lm = new AssetLandmark(lma);
521 521
522 if (lm.RegionID == m_scene.RegionInfo.SimUUID) 522 if (lm.RegionID == m_scene.RegionInfo.RegionID)
523 { 523 {
524 TeleportLocalPacket tpLocal = new TeleportLocalPacket(); 524 TeleportLocalPacket tpLocal = new TeleportLocalPacket();
525 525
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index 9a6bc82..fdc3994 100644
--- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -72,20 +72,20 @@ namespace OpenSim.Region.Communications.Local
72 /// </summary> 72 /// </summary>
73 /// <param name="regionInfo"></param> 73 /// <param name="regionInfo"></param>
74 /// <returns></returns> 74 /// <returns></returns>
75 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) 75 public List<SimpleRegionInfo> RequestNeighbours(uint x, uint y)
76 { 76 {
77 // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle); 77 // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle);
78 List<RegionInfo> neighbours = new List<RegionInfo>(); 78 List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>();
79 79
80 foreach (RegionInfo reg in this.m_regions.Values) 80 foreach (RegionInfo reg in m_regions.Values)
81 { 81 {
82 // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY); 82 // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY);
83 if (reg.RegionHandle != regionInfo.RegionHandle) 83 if (reg.RegionLocX != x || reg.RegionLocY != y)
84 { 84 {
85 //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location"); 85 //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location");
86 if ((reg.RegionLocX > (regionInfo.RegionLocX - 2)) && (reg.RegionLocX < (regionInfo.RegionLocX + 2))) 86 if ((reg.RegionLocX > (x - 2)) && (reg.RegionLocX < (x + 2)))
87 { 87 {
88 if ((reg.RegionLocY > (regionInfo.RegionLocY - 2)) && (reg.RegionLocY < (regionInfo.RegionLocY + 2))) 88 if ((reg.RegionLocY > (x - 2)) && (reg.RegionLocY < (x + 2)))
89 { 89 {
90 neighbours.Add(reg); 90 neighbours.Add(reg);
91 } 91 }
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Communications.Local
223 regData["status"] = "active"; 223 regData["status"] = "active";
224 regData["handle"] = region.ToString(); 224 regData["handle"] = region.ToString();
225 225
226 respData[reg.SimUUID.ToStringHyphenated()] = regData; 226 respData[reg.RegionID.ToStringHyphenated()] = regData;
227 } 227 }
228 } 228 }
229 229
@@ -254,3 +254,4 @@ namespace OpenSim.Region.Communications.Local
254 } 254 }
255} 255}
256 256
257
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 1a92aaa..9c10d04 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Communications.Local
127 127
128 response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; 128 response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/";
129 // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; 129 // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/";
130 theUser.currentAgent.currentRegion = reg.SimUUID; 130 theUser.currentAgent.currentRegion = reg.RegionID;
131 theUser.currentAgent.currentHandle = reg.RegionHandle; 131 theUser.currentAgent.currentHandle = reg.RegionHandle;
132 132
133 Login _login = new Login(); 133 Login _login = new Login();
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 1264052..1a9584a 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -30,9 +30,12 @@ using System;
30using System.Collections; 30using System.Collections;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Net; 32using System.Net;
33using System.Net.Sockets;
33using System.Runtime.Remoting; 34using System.Runtime.Remoting;
34using System.Runtime.Remoting.Channels; 35using System.Runtime.Remoting.Channels;
35using System.Runtime.Remoting.Channels.Tcp; 36using System.Runtime.Remoting.Channels.Tcp;
37using System.Security.Authentication;
38
36using libsecondlife; 39using libsecondlife;
37using Nwc.XmlRpc; 40using Nwc.XmlRpc;
38using OpenSim.Framework; 41using OpenSim.Framework;
@@ -78,7 +81,7 @@ namespace OpenSim.Region.Communications.OGS1
78 // Login / Authentication 81 // Login / Authentication
79 82
80 GridParams["authkey"] = serversInfo.GridSendKey; 83 GridParams["authkey"] = serversInfo.GridSendKey;
81 GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); 84 GridParams["UUID"] = regionInfo.RegionID.ToStringHyphenated();
82 GridParams["sim_ip"] = regionInfo.ExternalHostName; 85 GridParams["sim_ip"] = regionInfo.ExternalHostName;
83 GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); 86 GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString();
84 GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); 87 GridParams["region_locx"] = regionInfo.RegionLocX.ToString();
@@ -115,12 +118,12 @@ namespace OpenSim.Region.Communications.OGS1
115 /// </summary> 118 /// </summary>
116 /// <param name="regionInfo"></param> 119 /// <param name="regionInfo"></param>
117 /// <returns></returns> 120 /// <returns></returns>
118 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) 121 public List<SimpleRegionInfo> RequestNeighbours(uint x, uint y)
119 { 122 {
120 123
121 Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1); 124 Hashtable respData = MapBlockQuery((int)x - 1, (int)y - 1, (int)x + 1, (int)y + 1);
122 125
123 List<RegionInfo> neighbours = new List<RegionInfo>(); 126 List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>();
124 127
125 foreach (ArrayList neighboursList in respData.Values) 128 foreach (ArrayList neighboursList in respData.Values)
126 { 129 {
@@ -128,27 +131,20 @@ namespace OpenSim.Region.Communications.OGS1
128 { 131 {
129 uint regX = Convert.ToUInt32(neighbourData["x"]); 132 uint regX = Convert.ToUInt32(neighbourData["x"]);
130 uint regY = Convert.ToUInt32(neighbourData["y"]); 133 uint regY = Convert.ToUInt32(neighbourData["y"]);
131 if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) 134 if ((x != regX) || (y != regY))
132 { 135 {
136
133 string simIp = (string)neighbourData["sim_ip"]; 137 string simIp = (string)neighbourData["sim_ip"];
134 138
135 uint port = Convert.ToUInt32(neighbourData["sim_port"]); 139 int port = Convert.ToInt32(neighbourData["sim_port"]);
136 string externalUri = (string)neighbourData["sim_uri"]; 140 string externalUri = (string)neighbourData["sim_uri"];
137 141
138 string externalIpStr = OpenSim.Framework.Utilities.Util.GetHostFromDNS(simIp).ToString(); 142 string externalIpStr = OpenSim.Framework.Utilities.Util.GetHostFromDNS(simIp).ToString();
139 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port); 143 SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port);
140 string neighbourExternalUri = externalUri; 144 sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]);
141 RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr); 145 sri.RegionID = new LLUUID((string)neighbourData["uuid"]);
142
143 //OGS1
144 //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally
145
146 neighbour.RegionName = (string)neighbourData["name"];
147 146
148 //OGS1+ 147 neighbours.Add(sri);
149 neighbour.SimUUID = new LLUUID((string)neighbourData["uuid"]);
150
151 neighbours.Add(neighbour);
152 } 148 }
153 } 149 }
154 } 150 }
@@ -199,7 +195,7 @@ namespace OpenSim.Region.Communications.OGS1
199 regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 195 regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
200 regionInfo.RemotingAddress = internalIpStr; 196 regionInfo.RemotingAddress = internalIpStr;
201 197
202 regionInfo.SimUUID = new LLUUID((string)responseData["region_UUID"]); 198 regionInfo.RegionID = new LLUUID((string)responseData["region_UUID"]);
203 regionInfo.RegionName = (string)responseData["region_name"]; 199 regionInfo.RegionName = (string)responseData["region_name"];
204 200
205 return regionInfo; 201 return regionInfo;
@@ -365,6 +361,7 @@ namespace OpenSim.Region.Communications.OGS1
365 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( 361 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
366 typeof(OGS1InterRegionRemoting), 362 typeof(OGS1InterRegionRemoting),
367 "tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions"); 363 "tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions");
364
368 if (remObject != null) 365 if (remObject != null)
369 { 366 {
370 retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData); 367 retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData);
@@ -386,10 +383,27 @@ namespace OpenSim.Region.Communications.OGS1
386 MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); 383 MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString());
387 return false; 384 return false;
388 } 385 }
389 catch 386 catch (SocketException e)
387 {
388 MainLog.Instance.Error("Socket Error: Unable to connect to remote region.\n" + e.ToString());
389 return false;
390 }
391 catch (InvalidCredentialException e)
392 {
393 MainLog.Instance.Error("Invalid Credentials: Unable to connect to remote region.\n" + e.ToString());
394 return false;
395 }
396 catch (AuthenticationException e)
397 {
398 MainLog.Instance.Error("Authentication exception: Unable to connect to remote region.\n" + e.ToString());
399 return false;
400 }
401 catch (Exception e)
390 { 402 {
403 MainLog.Instance.Error("Unknown exception: Unable to connect to remote region.\n" + e.ToString());
391 return false; 404 return false;
392 } 405 }
406 return true;
393 } 407 }
394 408
395 /// <summary> 409 /// <summary>
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
index bac0d59..e776717 100644
--- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
@@ -47,9 +47,9 @@ namespace OpenSim.Region.Environment.Modules
47 47
48 public void Initialise(Scene scene) 48 public void Initialise(Scene scene)
49 { 49 {
50 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.SimUUID)) 50 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
51 { 51 {
52 RegisteredScenes.Add(scene.RegionInfo.SimUUID, scene); 52 RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
53 scene.RegisterModuleInterface<IDynamicTextureManager>(this); 53 scene.RegisterModuleInterface<IDynamicTextureManager>(this);
54 } 54 }
55 } 55 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 567fbd9..ee515ea 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -403,7 +403,7 @@ namespace OpenSim.Region.Environment.Scenes
403 } 403 }
404 404
405 storageManager.DataStore.RemoveObject(((SceneObjectGroup) selectedEnt).UUID, 405 storageManager.DataStore.RemoveObject(((SceneObjectGroup) selectedEnt).UUID,
406 m_regInfo.SimUUID); 406 m_regInfo.RegionID);
407 ((SceneObjectGroup) selectedEnt).DeleteGroup(); 407 ((SceneObjectGroup) selectedEnt).DeleteGroup();
408 408
409 lock (Entities) 409 lock (Entities)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index b0f0b9a..ab8a48a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -26,6 +26,7 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Net;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using System.IO; 31using System.IO;
31using System.Threading; 32using System.Threading;
@@ -529,7 +530,7 @@ namespace OpenSim.Region.Environment.Scenes
529 public virtual void LoadPrimsFromStorage() 530 public virtual void LoadPrimsFromStorage()
530 { 531 {
531 MainLog.Instance.Verbose("Loading objects from datastore"); 532 MainLog.Instance.Verbose("Loading objects from datastore");
532 List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.SimUUID); 533 List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.RegionID);
533 foreach (SceneObjectGroup prim in PrimsFromDB) 534 foreach (SceneObjectGroup prim in PrimsFromDB)
534 { 535 {
535 AddEntityFromStorage(prim); 536 AddEntityFromStorage(prim);
@@ -964,7 +965,7 @@ namespace OpenSim.Region.Environment.Scenes
964 if (Entities.ContainsKey(entID)) 965 if (Entities.ContainsKey(entID))
965 { 966 {
966 Entities.Remove(entID); 967 Entities.Remove(entID);
967 storageManager.DataStore.RemoveObject(entID, m_regInfo.SimUUID); 968 storageManager.DataStore.RemoveObject(entID, m_regInfo.RegionID);
968 return true; 969 return true;
969 } 970 }
970 return false; 971 return false;
@@ -1062,13 +1063,32 @@ namespace OpenSim.Region.Environment.Scenes
1062 } 1063 }
1063 } 1064 }
1064 1065
1066 delegate void InformClientOfNeighbourDelegate(IClientAPI remoteClient, AgentCircuitData a, ulong regionHandle, IPEndPoint endPoint);
1067
1068 /// <summary>
1069 /// Async compnent for informing client of which neighbours exists
1070 /// </summary>
1071 /// <remarks>
1072 /// This needs to run asynchronesously, as a network timeout may block the thread for a long while
1073 /// </remarks>
1074 /// <param name="remoteClient"></param>
1075 /// <param name="a"></param>
1076 /// <param name="regionHandle"></param>
1077 /// <param name="endPoint"></param>
1078 public void InformClientOfNeighbourAsync(IClientAPI remoteClient, AgentCircuitData a, ulong regionHandle, IPEndPoint endPoint)
1079 {
1080 bool regionAccepted = commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, a);
1081
1082 if (regionAccepted)
1083 remoteClient.InformClientOfNeighbour(regionHandle, endPoint);
1084 }
1085
1065 /// <summary> 1086 /// <summary>
1066 /// 1087 ///
1067 /// </summary> 1088 /// </summary>
1068 public void InformClientOfNeighbours(IClientAPI remoteClient) 1089 public void InformClientOfNeighbours(IClientAPI remoteClient)
1069 { 1090 {
1070 List<RegionInfo> neighbours = commsManager.GridService.RequestNeighbours(m_regInfo); 1091 List<SimpleRegionInfo> neighbours = commsManager.GridService.RequestNeighbours(m_regInfo.RegionLocX, m_regInfo.RegionLocY);
1071
1072 if (neighbours != null) 1092 if (neighbours != null)
1073 { 1093 {
1074 for (int i = 0; i < neighbours.Count; i++) 1094 for (int i = 0; i < neighbours.Count; i++)
@@ -1078,8 +1098,9 @@ namespace OpenSim.Region.Environment.Scenes
1078 agent.InventoryFolder = LLUUID.Zero; 1098 agent.InventoryFolder = LLUUID.Zero;
1079 agent.startpos = new LLVector3(128, 128, 70); 1099 agent.startpos = new LLVector3(128, 128, 70);
1080 agent.child = true; 1100 agent.child = true;
1081 commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent); 1101
1082 remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint); 1102 InformClientOfNeighbourDelegate d = new InformClientOfNeighbourDelegate(InformClientOfNeighbourAsync);
1103 IAsyncResult asyncInform = d.BeginInvoke(remoteClient, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint, null, null);
1083 //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort); 1104 //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort);
1084 } 1105 }
1085 } 1106 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 9f8ea0c..21edbac 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Scenes
197 { 197 {
198 if (m_scene != null) 198 if (m_scene != null)
199 { 199 {
200 return m_scene.RegionInfo.SimUUID; 200 return m_scene.RegionInfo.RegionID;
201 } 201 }
202 return LLUUID.Zero; 202 return LLUUID.Zero;
203 } 203 }
@@ -1173,7 +1173,7 @@ namespace OpenSim.Region.Environment.Scenes
1173 { 1173 {
1174 if (HasChanged) 1174 if (HasChanged)
1175 { 1175 {
1176 datastore.StoreObject(this, m_scene.RegionInfo.SimUUID); 1176 datastore.StoreObject(this, m_scene.RegionInfo.RegionID);
1177 HasChanged = false; 1177 HasChanged = false;
1178 } 1178 }
1179 } 1179 }
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 22a0754..2f5829a 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -770,7 +770,7 @@ namespace OpenSim.Region.Environment.Scenes
770 770
771 protected void CheckForSignificantMovement() 771 protected void CheckForSignificantMovement()
772 { 772 {
773 if (Helpers.VecDist(AbsolutePosition, posLastSignificantMove) > 2.0) 773 if (AbsolutePosition.GetDistanceTo(posLastSignificantMove) > 2.0)
774 { 774 {
775 posLastSignificantMove = AbsolutePosition; 775 posLastSignificantMove = AbsolutePosition;
776 if (OnSignificantClientMovement != null) 776 if (OnSignificantClientMovement != null)
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 05811e2..4388b31 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -1221,7 +1221,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1221 if (dynamicID == "") 1221 if (dynamicID == "")
1222 { 1222 {
1223 IDynamicTextureManager textureManager = this.World.RequestModuleInterface<IDynamicTextureManager>(); 1223 IDynamicTextureManager textureManager = this.World.RequestModuleInterface<IDynamicTextureManager>();
1224 LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.SimUUID, this.m_host.UUID, contentType, url, extraParams, timer); 1224 LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, this.m_host.UUID, contentType, url, extraParams, timer);
1225 return createdTexture.ToStringHyphenated(); 1225 return createdTexture.ToStringHyphenated();
1226 } 1226 }
1227 else 1227 else