mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
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.
This commit is contained in:
@@ -158,6 +158,7 @@ namespace OpenSim.Region.ClientStack
|
||||
private UpdateShape handlerUpdatePrimShape = null; //null;
|
||||
private ObjectExtraParams handlerUpdateExtraParams = null; //OnUpdateExtraParams;
|
||||
private ObjectDuplicate handlerObjectDuplicate = null;
|
||||
private ObjectDuplicateOnRay handlerObjectDuplicateOnRay = null;
|
||||
private ObjectSelect handlerObjectSelect = null;
|
||||
private ObjectDeselect handlerObjectDeselect = null;
|
||||
private UpdatePrimFlags handlerUpdatePrimFlags = null; //OnUpdatePrimFlags;
|
||||
@@ -675,6 +676,7 @@ namespace OpenSim.Region.ClientStack
|
||||
public event UpdateVector OnGrabObject;
|
||||
public event ObjectSelect OnDeGrabObject;
|
||||
public event ObjectDuplicate OnObjectDuplicate;
|
||||
public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
|
||||
public event MoveObject OnGrabUpdate;
|
||||
public event AddNewPrim OnAddPrim;
|
||||
public event RequestGodlikePowers OnRequestGodlikePowers;
|
||||
@@ -3590,7 +3592,26 @@ namespace OpenSim.Region.ClientStack
|
||||
// That means multiple object perms may be updated in a single packet.
|
||||
|
||||
break;
|
||||
case PacketType.ObjectDuplicateOnRay:
|
||||
ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack;
|
||||
|
||||
handlerObjectDuplicateOnRay = null;
|
||||
|
||||
|
||||
for (int i = 0; i < dupeOnRay.ObjectData.Length; i++)
|
||||
{
|
||||
handlerObjectDuplicateOnRay = OnObjectDuplicateOnRay;
|
||||
if (handlerObjectDuplicateOnRay != null)
|
||||
{
|
||||
handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags,
|
||||
dupeOnRay.AgentData.AgentID, dupeOnRay.AgentData.GroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd,
|
||||
dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection,
|
||||
dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
case PacketType.RequestObjectPropertiesFamily:
|
||||
//This powers the little tooltip that appears when you move your mouse over an object
|
||||
RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack;
|
||||
|
||||
@@ -225,6 +225,12 @@ namespace OpenSim.Region.Communications.Local
|
||||
public virtual bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle)
|
||||
{
|
||||
RegionInfo region = new RegionInfo(sregion);
|
||||
|
||||
//region.RegionLocX = sregion.X;
|
||||
//region.RegionLocY = sregion.Y;
|
||||
//region.SetEndPoint(sregion.IPADDR, sregion.PORT);
|
||||
|
||||
//sregion);
|
||||
if (m_regionListeners.ContainsKey(regionhandle))
|
||||
{
|
||||
return m_regionListeners[regionhandle].TriggerRegionUp(region);
|
||||
@@ -316,11 +322,11 @@ namespace OpenSim.Region.Communications.Local
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
||||
public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData, int XMLMethod)
|
||||
{
|
||||
if (m_regionListeners.ContainsKey(regionHandle))
|
||||
{
|
||||
m_regionListeners[regionHandle].TriggerExpectPrim(regionHandle, primID, objData);
|
||||
m_regionListeners[regionHandle].TriggerExpectPrim(regionHandle, primID, objData, XMLMethod);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -408,11 +414,11 @@ namespace OpenSim.Region.Communications.Local
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData)
|
||||
public void TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod)
|
||||
{
|
||||
if (m_regionListeners.ContainsKey(regionHandle))
|
||||
{
|
||||
m_regionListeners[regionHandle].TriggerExpectPrim(regionHandle, primID, objData);
|
||||
m_regionListeners[regionHandle].TriggerExpectPrim(regionHandle, primID, objData, XMLMethod);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -857,6 +857,8 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
// The region asking the grid services about itself..
|
||||
// And, surprisingly, the reason is.. it doesn't know
|
||||
// it's own remoting port! How special.
|
||||
RegionUpData regiondata = new RegionUpData(region.RegionLocX, region.RegionLocY, region.ExternalHostName, region.InternalEndPoint.Port);
|
||||
|
||||
region = new SearializableRegionInfo(RequestNeighbourInfo(region.RegionHandle));
|
||||
region.RemotingAddress = region.ExternalHostName;
|
||||
region.RemotingPort = NetworkServersInfo.RemotingListenerPort;
|
||||
@@ -885,7 +887,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
|
||||
if (remObject != null)
|
||||
{
|
||||
retValue = remObject.RegionUp(region, regionhandle);
|
||||
retValue = remObject.RegionUp(regiondata, regionhandle);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -962,7 +964,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
/// <param name="regionHandle"></param>
|
||||
/// <param name="agentData"></param>
|
||||
/// <returns></returns>
|
||||
public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
||||
public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData, int XMLMethod)
|
||||
{
|
||||
int failures = 0;
|
||||
lock (m_deadRegionCache)
|
||||
@@ -977,7 +979,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
RegionInfo regInfo = null;
|
||||
try
|
||||
{
|
||||
if (m_localBackend.InformRegionOfPrimCrossing(regionHandle, primID, objData))
|
||||
if (m_localBackend.InformRegionOfPrimCrossing(regionHandle, primID, objData, XMLMethod))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -996,7 +998,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
|
||||
if (remObject != null)
|
||||
{
|
||||
retValue = remObject.InformRegionOfPrimCrossing(regionHandle, primID.UUID, objData);
|
||||
retValue = remObject.InformRegionOfPrimCrossing(regionHandle, primID.UUID, objData, XMLMethod);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1325,23 +1327,29 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
}
|
||||
}
|
||||
|
||||
public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle)
|
||||
public bool TriggerRegionUp(RegionUpData regionData, ulong regionhandle)
|
||||
{
|
||||
m_log.Info("[OGS1 GRID SERVICES]: " +
|
||||
gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX +
|
||||
"," + regionData.RegionLocY + "). Giving this region a fresh set of 'dead' tries");
|
||||
gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.X +
|
||||
"," + regionData.Y + "). Giving this region a fresh set of 'dead' tries");
|
||||
RegionInfo nRegionInfo = new RegionInfo();
|
||||
nRegionInfo.SetEndPoint("127.0.0.1", regionData.PORT);
|
||||
nRegionInfo.ExternalHostName = regionData.IPADDR;
|
||||
nRegionInfo.RegionLocX = regionData.X;
|
||||
nRegionInfo.RegionLocY = regionData.Y;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
lock (m_deadRegionCache)
|
||||
{
|
||||
if (m_deadRegionCache.ContainsKey(regionData.RegionHandle))
|
||||
if (m_deadRegionCache.ContainsKey(nRegionInfo.RegionHandle))
|
||||
{
|
||||
m_deadRegionCache.Remove(regionData.RegionHandle);
|
||||
m_deadRegionCache.Remove(nRegionInfo.RegionHandle);
|
||||
}
|
||||
}
|
||||
|
||||
return m_localBackend.TriggerRegionUp(new RegionInfo(regionData), regionhandle);
|
||||
return m_localBackend.TriggerRegionUp(nRegionInfo, regionhandle);
|
||||
}
|
||||
|
||||
catch (RemotingException e)
|
||||
@@ -1372,12 +1380,12 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
/// <param name="regionHandle"></param>
|
||||
/// <param name="agentData"></param>
|
||||
/// <returns></returns>
|
||||
public bool IncomingPrim(ulong regionHandle, LLUUID primID, string objData)
|
||||
public bool IncomingPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod)
|
||||
{
|
||||
// Is this necessary?
|
||||
try
|
||||
{
|
||||
m_localBackend.TriggerExpectPrim(regionHandle, primID, objData);
|
||||
m_localBackend.TriggerExpectPrim(regionHandle, primID, objData, XMLMethod);
|
||||
return true;
|
||||
//m_localBackend.
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
|
||||
public delegate bool InformRegionPrimGroup(ulong regionHandle, LLUUID primID, LLVector3 Positon, bool isPhysical);
|
||||
|
||||
public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData);
|
||||
public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData, int XMLMethod);
|
||||
|
||||
public delegate bool RegionUp(SearializableRegionInfo region, ulong regionhandle);
|
||||
public delegate bool RegionUp(RegionUpData region, ulong regionhandle);
|
||||
|
||||
public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate);
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool RegionUp(SearializableRegionInfo sregion, ulong regionhandle)
|
||||
public bool RegionUp(RegionUpData sregion, ulong regionhandle)
|
||||
{
|
||||
handlerRegionUp = OnRegionUp;
|
||||
if (handlerRegionUp != null)
|
||||
@@ -130,12 +130,12 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData)
|
||||
public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData, int XMLMethod)
|
||||
{
|
||||
handlerPrimGroupArrival = OnPrimGroupArrival;
|
||||
if (handlerPrimGroupArrival != null)
|
||||
{
|
||||
return handlerPrimGroupArrival(regionHandle, primID, objData);
|
||||
return handlerPrimGroupArrival(regionHandle, primID, objData, XMLMethod);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
}
|
||||
}
|
||||
|
||||
public bool RegionUp(SearializableRegionInfo region, ulong regionhandle)
|
||||
public bool RegionUp(RegionUpData region, ulong regionhandle)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -232,11 +232,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
}
|
||||
}
|
||||
|
||||
public bool InformRegionOfPrimCrossing(ulong regionHandle, Guid primID, string objData)
|
||||
public bool InformRegionOfPrimCrossing(ulong regionHandle, Guid primID, string objData, int XMLMethod)
|
||||
{
|
||||
try
|
||||
{
|
||||
return InterRegionSingleton.Instance.ExpectPrimCrossing(regionHandle, new LLUUID(primID), objData);
|
||||
return InterRegionSingleton.Instance.ExpectPrimCrossing(regionHandle, new LLUUID(primID), objData, XMLMethod);
|
||||
}
|
||||
catch (RemotingException e)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -148,6 +148,8 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||
public event RegionInfoRequest OnRegionInfoRequest;
|
||||
public event EstateCovenantRequest OnEstateCovenantRequest;
|
||||
|
||||
public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
|
||||
|
||||
public event FriendActionDelegate OnApproveFriendRequest;
|
||||
public event FriendActionDelegate OnDenyFriendRequest;
|
||||
public event FriendshipTermination OnTerminateFriendship;
|
||||
|
||||
Reference in New Issue
Block a user