From fd2caf5f1673ad14702d89db9804f841c5cb861a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 30 Mar 2008 08:01:47 +0000 Subject: This update has good news and bad news, first the bad. * This update breaks inter-region communications, sorry. * You will need to run prebuild. Next, the good; * This update solves the unexpected binary element when Linux simulators inform windows simulators and vice versa. So Linux Simulators and Windows simulators are 100% compatible again. * This update introduces an Integer in the prim crossing method to tell the receiving simulator which XML method to use to load the prim that crossed the border. If the receiving prim doesn't support the method, the prim crossing fails and no prims are lost. That being said, it's best to update all your simulators to this revision at once. --- OpenSim/Region/Environment/Scenes/Scene.cs | 17 ++++++++++++++--- .../Environment/Scenes/SceneCommunicationService.cs | 16 +++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index c07f718..819815b 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1242,6 +1242,9 @@ namespace OpenSim.Region.Environment.Scenes m_log.Warn("Prim crossing: " + grp.UUID.ToString()); int thisx = (int)RegionInfo.RegionLocX; int thisy = (int)RegionInfo.RegionLocY; + + int primcrossingXMLmethod = 0; + ulong newRegionHandle = 0; LLVector3 pos = position; @@ -1279,7 +1282,7 @@ namespace OpenSim.Region.Environment.Scenes if (newRegionHandle != 0) { bool successYN = false; - successYN = m_sceneGridService.PrimCrossToNeighboringRegion(newRegionHandle, grp.UUID, m_sceneXmlLoader.SavePrimGroupToXML2String(grp)); + successYN = m_sceneGridService.PrimCrossToNeighboringRegion(newRegionHandle, grp.UUID, m_sceneXmlLoader.SavePrimGroupToXML2String(grp), primcrossingXMLmethod); if (successYN) { // We remove the object here @@ -1306,10 +1309,18 @@ namespace OpenSim.Region.Environment.Scenes } } - public void IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData) + public bool IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData, int XMLMethod) { m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); - m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData); + if (XMLMethod == 0) + { + m_sceneXmlLoader.LoadGroupFromXml2String(objXMLData); + return true; + } + else + { + return false; + } } diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 7653bf4..db2327e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -168,12 +168,16 @@ namespace OpenSim.Region.Environment.Scenes } } - protected void IncomingPrimCrossing(ulong regionHandle, LLUUID primID, String objXMLData) + protected bool IncomingPrimCrossing(ulong regionHandle, LLUUID primID, String objXMLData, int XMLMethod) { handlerExpectPrim = OnExpectPrim; if (handlerExpectPrim != null) { - handlerExpectPrim(regionHandle, primID, objXMLData); + return handlerExpectPrim(regionHandle, primID, objXMLData, XMLMethod); + } + else + { + return false; } } @@ -342,8 +346,10 @@ namespace OpenSim.Region.Environment.Scenes private void InformNeighboursThatRegionIsUpAsync(RegionInfo region, ulong regionhandle) { m_log.Info("[INTERGRID]: Starting to inform neighbors that I'm here"); + //RegionUpData regiondata = new RegionUpData(region.RegionLocX, region.RegionLocY, region.ExternalHostName, region.InternalEndPoint.Port); + bool regionAccepted = - m_commsProvider.InterRegion.RegionUp((new SearializableRegionInfo(region)), regionhandle); + m_commsProvider.InterRegion.RegionUp(new SearializableRegionInfo(region), regionhandle); if (regionAccepted) { @@ -605,9 +611,9 @@ namespace OpenSim.Region.Environment.Scenes return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying); } - public bool PrimCrossToNeighboringRegion(ulong regionhandle, LLUUID primID, string objData) + public bool PrimCrossToNeighboringRegion(ulong regionhandle, LLUUID primID, string objData, int XMLMethod) { - return m_commsProvider.InterRegion.InformRegionOfPrimCrossing(regionhandle, primID, objData); + return m_commsProvider.InterRegion.InformRegionOfPrimCrossing(regionhandle, primID, objData, XMLMethod); } -- cgit v1.1