* Finished SimulationServiceConnector

* Started rerouting calls to UserService.
* Compiles. May run.
This commit is contained in:
Diva Canto
2010-01-07 15:53:55 -08:00
parent 39293758f1
commit f11a97f12d
17 changed files with 359 additions and 128 deletions

View File

@@ -172,12 +172,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
{
if (s.RegionInfo.RegionHandle == destination.RegionHandle)
{
// m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle);
m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", destination.RegionName);
return s.NewUserConnection(aCircuit, teleportFlags, out reason);
}
}
// m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", regionHandle);
m_log.DebugFormat("[LOCAL COMMS]: Did not find region {0} for SendCreateChildAgent", destination.RegionName);
reason = "Did not find region " + destination.RegionName;
return false;
}
@@ -241,14 +241,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return false;
}
public bool ReleaseAgent(GridRegion destination, UUID id, string uri)
public bool ReleaseAgent(UUID origin, UUID id, string uri)
{
if (destination == null)
return false;
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionHandle == destination.RegionHandle)
if (s.RegionInfo.RegionID == origin)
{
//m_log.Debug("[LOCAL COMMS]: Found region to SendReleaseAgent");
return s.IncomingReleaseAgent(id);
@@ -334,6 +331,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return false;
}
public bool IsLocalRegion(UUID id)
{
foreach (Scene s in m_sceneList)
if (s.RegionInfo.RegionID == id)
return true;
return false;
}
#endregion
}
}

View File

@@ -245,18 +245,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
}
public bool ReleaseAgent(GridRegion destination, UUID id, string uri)
public bool ReleaseAgent(UUID origin, UUID id, string uri)
{
if (destination == null)
return false;
// Try local first
if (m_localBackend.ReleaseAgent(destination, id, uri))
if (m_localBackend.ReleaseAgent(origin, id, uri))
return true;
// else do the remote thing
if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
return m_remoteConnector.ReleaseAgent(destination, id, uri);
if (!m_localBackend.IsLocalRegion(origin))
return m_remoteConnector.ReleaseAgent(origin, id, uri);
return false;
}