From 05df8571323c535b5c1ce1b0532e88236b143b7e Mon Sep 17 00:00:00 2001 From: Tleiades Hax Date: Thu, 18 Oct 2007 15:10:43 +0000 Subject: [PATCH] Possible fix for: Remoting exceptions with adjacent non-running sims. Bugs 449, 454, 408, 244, 197 implemented InformClientOfNeighbours as an asynchroneous process, handling timeouts without blocking the main thread. Improved logging of errors, removed catch all in try catch --- .../Framework/Communications/IGridServices.cs | 5 +- OpenSim/Framework/General/Types/RegionInfo.cs | 102 +++++++++++------- OpenSim/Grid/GridServer/GridManager.cs | 1 + .../Server_API/LSL_BuiltIn_Commands.cs | 2 +- .../ClientStack/ClientView.ProcessPackets.cs | 2 +- .../Local/LocalBackEndServices.cs | 15 +-- .../Communications/Local/LocalLoginService.cs | 2 +- .../Communications/OGS1/OGS1GridServices.cs | 54 ++++++---- .../Modules/DynamicTextureModule.cs | 4 +- .../Environment/Scenes/Scene.Inventory.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 33 ++++-- .../Environment/Scenes/SceneObjectGroup.cs | 4 +- .../Environment/Scenes/ScenePresence.cs | 2 +- .../Server_API/LSL_BuiltIn_Commands.cs | 2 +- 14 files changed, 148 insertions(+), 82 deletions(-) diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index d538e23ecc..4167b65dad 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs @@ -27,6 +27,9 @@ */ using System.Collections.Generic; +using System.Net; +using libsecondlife; + using OpenSim.Framework.Types; namespace OpenSim.Framework.Communications @@ -34,7 +37,7 @@ namespace OpenSim.Framework.Communications public interface IGridServices { RegionCommsListener RegisterRegion(RegionInfo regionInfos); - List RequestNeighbours(RegionInfo regionInfo); + List RequestNeighbours(uint x, uint y); RegionInfo RequestNeighbourInfo(ulong regionHandle); List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); } diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index 5054510e16..77109aa125 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs @@ -40,20 +40,51 @@ using OpenSim.Framework.Configuration; namespace OpenSim.Framework.Types { - public class RegionInfo + public class SimpleRegionInfo { - public LLUUID SimUUID = new LLUUID(); - public string RegionName = ""; + public SimpleRegionInfo() + { + } - private IPEndPoint m_internalEndPoint; - public IPEndPoint InternalEndPoint + public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) + { + + m_regionLocX = regionLocX; + m_regionLocY = regionLocY; + + m_internalEndPoint = internalEndPoint; + m_externalHostName = externalUri; + } + + public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port) + { + + m_regionLocX = regionLocX; + m_regionLocY = regionLocY; + + m_externalHostName = externalUri; + + m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port); + } + + public LLUUID RegionID = new LLUUID(); + + private uint m_remotingPort; + public uint RemotingPort { get { - return m_internalEndPoint; + return m_remotingPort; + } + set + { + m_remotingPort = value; } } + public string RemotingAddress; + + public IPEndPoint ExternalEndPoint { get @@ -86,9 +117,14 @@ namespace OpenSim.Framework.Types return new IPEndPoint(ia, m_internalEndPoint.Port); } + + set + { + m_externalHostName = value.ToString(); + } } - private string m_externalHostName; + protected string m_externalHostName; public string ExternalHostName { get @@ -97,7 +133,16 @@ namespace OpenSim.Framework.Types } } - private uint? m_regionLocX; + protected IPEndPoint m_internalEndPoint; + public IPEndPoint InternalEndPoint + { + get + { + return m_internalEndPoint; + } + } + + protected uint? m_regionLocX; public uint RegionLocX { get @@ -106,7 +151,7 @@ namespace OpenSim.Framework.Types } } - private uint? m_regionLocY; + protected uint? m_regionLocY; public uint RegionLocY { get @@ -115,33 +160,18 @@ namespace OpenSim.Framework.Types } } - private ulong? m_regionHandle; public ulong RegionHandle { get { - if (!m_regionHandle.HasValue) - { - m_regionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); - } - - return m_regionHandle.Value; + return Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); } } + } - private uint m_remotingPort; - public uint RemotingPort - { - get - { - return m_remotingPort; - } - set - { - m_remotingPort = value; - } - } - public string RemotingAddress; + public class RegionInfo : SimpleRegionInfo + { + public string RegionName = ""; public string DataStore = ""; public bool isSandbox = false; @@ -161,15 +191,11 @@ namespace OpenSim.Framework.Types configMember.performConfigurationRetrieve(); } - public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) + public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) : + base(regionLocX, regionLocY, internalEndPoint, externalUri) { estateSettings = new EstateSettings(); - m_regionLocX = regionLocX; - m_regionLocY = regionLocY; - - m_internalEndPoint = internalEndPoint; - m_externalHostName = externalUri; } public void LoadFromNiniSource(IConfigSource source) @@ -180,7 +206,7 @@ namespace OpenSim.Framework.Types public void LoadFromNiniSource(IConfigSource source, string sectionName) { string errorMessage = ""; - this.SimUUID = new LLUUID(source.Configs[sectionName].GetString("sim_UUID", LLUUID.Random().ToStringHyphenated())); + this.RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated())); this.RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); this.m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); this.m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); @@ -220,7 +246,7 @@ namespace OpenSim.Framework.Types public void loadConfigurationOptions() { - configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Simulator (Default is recommended, random UUID)", LLUUID.Random().ToString(), true); + configMember.addConfigurationOption("Region_ID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "UUID of Simulator (Default is recommended, random UUID)", LLUUID.Random().ToString(), true); configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Simulator Name", "OpenSim Test", false); configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (X Axis)", "1000", false); configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Grid Location (Y Axis)", "1000", false); @@ -238,7 +264,7 @@ namespace OpenSim.Framework.Types switch (configuration_key) { case "sim_UUID": - this.SimUUID = (LLUUID)configuration_result; + this.RegionID = (LLUUID)configuration_result; break; case "sim_name": this.RegionName = (string)configuration_result; diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 81197fd61b..9800b7454e 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -482,6 +482,7 @@ namespace OpenSim.Grid.GridServer simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString(); simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString(); simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated(); + simProfileBlock["remoting_port"] = aSim.Value.remotingPort; simProfileList.Add(simProfileBlock); } 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 90fe2cfd87..e5728fe36f 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 if (dynamicID == "") { IDynamicTextureManager textureManager = this.World.RequestModuleInterface(); - LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.SimUUID, this.m_host.UUID, contentType, url, extraParams, timer); + LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, this.m_host.UUID, contentType, url, extraParams, timer); return createdTexture.ToStringHyphenated(); } else diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index e526f733ed..d92127f326 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs @@ -519,7 +519,7 @@ namespace OpenSim.Region.ClientStack { AssetLandmark lm = new AssetLandmark(lma); - if (lm.RegionID == m_scene.RegionInfo.SimUUID) + if (lm.RegionID == m_scene.RegionInfo.RegionID) { TeleportLocalPacket tpLocal = new TeleportLocalPacket(); diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 9a6bc82def..fdc3994d1f 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -72,20 +72,20 @@ namespace OpenSim.Region.Communications.Local /// /// /// - public List RequestNeighbours(RegionInfo regionInfo) + public List RequestNeighbours(uint x, uint y) { // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle); - List neighbours = new List(); + List neighbours = new List(); - foreach (RegionInfo reg in this.m_regions.Values) + foreach (RegionInfo reg in m_regions.Values) { // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY); - if (reg.RegionHandle != regionInfo.RegionHandle) + if (reg.RegionLocX != x || reg.RegionLocY != y) { //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location"); - if ((reg.RegionLocX > (regionInfo.RegionLocX - 2)) && (reg.RegionLocX < (regionInfo.RegionLocX + 2))) + if ((reg.RegionLocX > (x - 2)) && (reg.RegionLocX < (x + 2))) { - if ((reg.RegionLocY > (regionInfo.RegionLocY - 2)) && (reg.RegionLocY < (regionInfo.RegionLocY + 2))) + if ((reg.RegionLocY > (x - 2)) && (reg.RegionLocY < (x + 2))) { neighbours.Add(reg); } @@ -223,7 +223,7 @@ namespace OpenSim.Region.Communications.Local regData["status"] = "active"; regData["handle"] = region.ToString(); - respData[reg.SimUUID.ToStringHyphenated()] = regData; + respData[reg.RegionID.ToStringHyphenated()] = regData; } } @@ -254,3 +254,4 @@ namespace OpenSim.Region.Communications.Local } } + diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 1a92aaa165..9c10d04de3 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -127,7 +127,7 @@ namespace OpenSim.Region.Communications.Local response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; - theUser.currentAgent.currentRegion = reg.SimUUID; + theUser.currentAgent.currentRegion = reg.RegionID; theUser.currentAgent.currentHandle = reg.RegionHandle; Login _login = new Login(); diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 12640520fd..1a9584a85a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -30,9 +30,12 @@ using System; using System.Collections; using System.Collections.Generic; using System.Net; +using System.Net.Sockets; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; +using System.Security.Authentication; + using libsecondlife; using Nwc.XmlRpc; using OpenSim.Framework; @@ -78,7 +81,7 @@ namespace OpenSim.Region.Communications.OGS1 // Login / Authentication GridParams["authkey"] = serversInfo.GridSendKey; - GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); + GridParams["UUID"] = regionInfo.RegionID.ToStringHyphenated(); GridParams["sim_ip"] = regionInfo.ExternalHostName; GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); @@ -115,12 +118,12 @@ namespace OpenSim.Region.Communications.OGS1 /// /// /// - public List RequestNeighbours(RegionInfo regionInfo) + public List RequestNeighbours(uint x, uint y) { - Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1); + Hashtable respData = MapBlockQuery((int)x - 1, (int)y - 1, (int)x + 1, (int)y + 1); - List neighbours = new List(); + List neighbours = new List(); foreach (ArrayList neighboursList in respData.Values) { @@ -128,27 +131,20 @@ namespace OpenSim.Region.Communications.OGS1 { uint regX = Convert.ToUInt32(neighbourData["x"]); uint regY = Convert.ToUInt32(neighbourData["y"]); - if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) + if ((x != regX) || (y != regY)) { + string simIp = (string)neighbourData["sim_ip"]; - uint port = Convert.ToUInt32(neighbourData["sim_port"]); + int port = Convert.ToInt32(neighbourData["sim_port"]); string externalUri = (string)neighbourData["sim_uri"]; string externalIpStr = OpenSim.Framework.Utilities.Util.GetHostFromDNS(simIp).ToString(); - IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port); - string neighbourExternalUri = externalUri; - RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr); + SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port); + sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]); + sri.RegionID = new LLUUID((string)neighbourData["uuid"]); - //OGS1 - //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally - - neighbour.RegionName = (string)neighbourData["name"]; - - //OGS1+ - neighbour.SimUUID = new LLUUID((string)neighbourData["uuid"]); - - neighbours.Add(neighbour); + neighbours.Add(sri); } } } @@ -199,7 +195,7 @@ namespace OpenSim.Region.Communications.OGS1 regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); regionInfo.RemotingAddress = internalIpStr; - regionInfo.SimUUID = new LLUUID((string)responseData["region_UUID"]); + regionInfo.RegionID = new LLUUID((string)responseData["region_UUID"]); regionInfo.RegionName = (string)responseData["region_name"]; return regionInfo; @@ -365,6 +361,7 @@ namespace OpenSim.Region.Communications.OGS1 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( typeof(OGS1InterRegionRemoting), "tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions"); + if (remObject != null) { retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData); @@ -386,10 +383,27 @@ namespace OpenSim.Region.Communications.OGS1 MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); return false; } - catch + catch (SocketException e) { + MainLog.Instance.Error("Socket Error: Unable to connect to remote region.\n" + e.ToString()); return false; } + catch (InvalidCredentialException e) + { + MainLog.Instance.Error("Invalid Credentials: Unable to connect to remote region.\n" + e.ToString()); + return false; + } + catch (AuthenticationException e) + { + MainLog.Instance.Error("Authentication exception: Unable to connect to remote region.\n" + e.ToString()); + return false; + } + catch (Exception e) + { + MainLog.Instance.Error("Unknown exception: Unable to connect to remote region.\n" + e.ToString()); + return false; + } + return true; } /// diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs index bac0d593ce..e776717c7f 100644 --- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs @@ -47,9 +47,9 @@ namespace OpenSim.Region.Environment.Modules public void Initialise(Scene scene) { - if (!RegisteredScenes.ContainsKey(scene.RegionInfo.SimUUID)) + if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) { - RegisteredScenes.Add(scene.RegionInfo.SimUUID, scene); + RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); scene.RegisterModuleInterface(this); } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 567fbd9289..ee515ead21 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 } storageManager.DataStore.RemoveObject(((SceneObjectGroup) selectedEnt).UUID, - m_regInfo.SimUUID); + m_regInfo.RegionID); ((SceneObjectGroup) selectedEnt).DeleteGroup(); lock (Entities) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index b0f0b9abcd..ab8a48a64f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -26,6 +26,7 @@ * */ using System; +using System.Net; using System.Collections.Generic; using System.IO; using System.Threading; @@ -529,7 +530,7 @@ namespace OpenSim.Region.Environment.Scenes public virtual void LoadPrimsFromStorage() { MainLog.Instance.Verbose("Loading objects from datastore"); - List PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.SimUUID); + List PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.RegionID); foreach (SceneObjectGroup prim in PrimsFromDB) { AddEntityFromStorage(prim); @@ -964,7 +965,7 @@ namespace OpenSim.Region.Environment.Scenes if (Entities.ContainsKey(entID)) { Entities.Remove(entID); - storageManager.DataStore.RemoveObject(entID, m_regInfo.SimUUID); + storageManager.DataStore.RemoveObject(entID, m_regInfo.RegionID); return true; } return false; @@ -1062,13 +1063,32 @@ namespace OpenSim.Region.Environment.Scenes } } + delegate void InformClientOfNeighbourDelegate(IClientAPI remoteClient, AgentCircuitData a, ulong regionHandle, IPEndPoint endPoint); + + /// + /// Async compnent for informing client of which neighbours exists + /// + /// + /// This needs to run asynchronesously, as a network timeout may block the thread for a long while + /// + /// + /// + /// + /// + public void InformClientOfNeighbourAsync(IClientAPI remoteClient, AgentCircuitData a, ulong regionHandle, IPEndPoint endPoint) + { + bool regionAccepted = commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, a); + + if (regionAccepted) + remoteClient.InformClientOfNeighbour(regionHandle, endPoint); + } + /// /// /// public void InformClientOfNeighbours(IClientAPI remoteClient) { - List neighbours = commsManager.GridService.RequestNeighbours(m_regInfo); - + List neighbours = commsManager.GridService.RequestNeighbours(m_regInfo.RegionLocX, m_regInfo.RegionLocY); if (neighbours != null) { for (int i = 0; i < neighbours.Count; i++) @@ -1078,8 +1098,9 @@ namespace OpenSim.Region.Environment.Scenes agent.InventoryFolder = LLUUID.Zero; agent.startpos = new LLVector3(128, 128, 70); agent.child = true; - commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent); - remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint); + + InformClientOfNeighbourDelegate d = new InformClientOfNeighbourDelegate(InformClientOfNeighbourAsync); + IAsyncResult asyncInform = d.BeginInvoke(remoteClient, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint, null, null); //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort); } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 9f8ea0c11e..21edbac274 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Scenes { if (m_scene != null) { - return m_scene.RegionInfo.SimUUID; + return m_scene.RegionInfo.RegionID; } return LLUUID.Zero; } @@ -1173,7 +1173,7 @@ namespace OpenSim.Region.Environment.Scenes { if (HasChanged) { - datastore.StoreObject(this, m_scene.RegionInfo.SimUUID); + datastore.StoreObject(this, m_scene.RegionInfo.RegionID); HasChanged = false; } } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 22a0754845..2f5829a6e6 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -770,7 +770,7 @@ namespace OpenSim.Region.Environment.Scenes protected void CheckForSignificantMovement() { - if (Helpers.VecDist(AbsolutePosition, posLastSignificantMove) > 2.0) + if (AbsolutePosition.GetDistanceTo(posLastSignificantMove) > 2.0) { posLastSignificantMove = AbsolutePosition; 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 05811e2c7b..4388b31f55 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 if (dynamicID == "") { IDynamicTextureManager textureManager = this.World.RequestModuleInterface(); - LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.SimUUID, this.m_host.UUID, contentType, url, extraParams, timer); + LLUUID createdTexture = textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, this.m_host.UUID, contentType, url, extraParams, timer); return createdTexture.ToStringHyphenated(); } else