Explicit tests for local regions.
parent
9489ad57f9
commit
047d753cd0
|
@ -260,6 +260,15 @@ namespace OpenSim.Region.CoreModules.Communications.Local
|
|||
// ? weird. should not happen
|
||||
return m_sceneList[0].RegionInfo.RegionID;
|
||||
}
|
||||
|
||||
public bool IsLocalRegion(ulong regionhandle)
|
||||
{
|
||||
foreach (Scene s in m_sceneList)
|
||||
if (s.RegionInfo.RegionHandle == regionhandle)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,6 +136,8 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(regionHandle))
|
||||
{
|
||||
RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle);
|
||||
if (regInfo != null)
|
||||
{
|
||||
|
@ -145,6 +147,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
}
|
||||
//else
|
||||
// m_log.Warn("[REST COMMS]: Region not found " + regionHandle);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -155,6 +158,8 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(regionHandle))
|
||||
{
|
||||
RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle);
|
||||
if (regInfo != null)
|
||||
{
|
||||
|
@ -162,6 +167,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
}
|
||||
//else
|
||||
// m_log.Warn("[REST COMMS]: Region not found " + regionHandle);
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
@ -173,6 +179,8 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(regionHandle))
|
||||
{
|
||||
RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle);
|
||||
if (regInfo != null)
|
||||
{
|
||||
|
@ -180,6 +188,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
}
|
||||
//else
|
||||
// m_log.Warn("[REST COMMS]: Region not found " + regionHandle);
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
@ -201,6 +210,8 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(regionHandle))
|
||||
{
|
||||
RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle);
|
||||
if (regInfo != null)
|
||||
{
|
||||
|
@ -208,6 +219,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
}
|
||||
//else
|
||||
// m_log.Warn("[REST COMMS]: Region not found " + regionHandle);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -225,6 +237,8 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
}
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(regionHandle))
|
||||
{
|
||||
RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle);
|
||||
if (regInfo != null)
|
||||
{
|
||||
|
@ -232,6 +246,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
|||
}
|
||||
//else
|
||||
// m_log.Warn("[REST COMMS]: Region not found " + regionHandle);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue