* Now the OGS1GridServices has a LocalBackEndServices that it forwards intra-instance requests to

* Every Scene has a ClientManager (as every dog it's day) since two scenes can have the same circuit as client.
afrisby
lbsa71 2007-09-25 06:33:18 +00:00
parent 2219ccc5b0
commit eb8640f368
9 changed files with 135 additions and 111 deletions

View File

@ -34,6 +34,6 @@ namespace OpenSim.Framework.Communications
{ {
bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData); bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying); bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying);
bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID); bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId);
} }
} }

View File

@ -100,5 +100,10 @@ namespace OpenSim.Framework
} }
} }
} }
public bool TryGetClient(uint circuitId, out IClientAPI user)
{
return m_clients.TryGetValue(circuitId, out user);
}
} }
} }

View File

@ -116,7 +116,6 @@ namespace OpenSim.Framework.Configuration
configurationPlugin.LoadData(); configurationPlugin.LoadData();
useFile = true; useFile = true;
} }
else else
{ {
MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file."); MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file.");

View File

@ -38,5 +38,10 @@ namespace OpenSim.Framework.Interfaces
RegionInfo RegionInfo { get; } RegionInfo RegionInfo { get; }
object SyncRoot { get; } object SyncRoot { get; }
uint NextLocalId { get; } uint NextLocalId { get; }
ClientManager ClientManager
{
get;
}
} }
} }

View File

@ -40,12 +40,13 @@ namespace OpenSim.Region.ClientStack
public class PacketServer public class PacketServer
{ {
private ClientStackNetworkHandler m_networkHandler; private ClientStackNetworkHandler m_networkHandler;
private IScene _localScene; private IScene m_scene;
private readonly ClientManager m_clientManager = new ClientManager();
public ClientManager ClientManager //private readonly ClientManager m_clientManager = new ClientManager();
{ //public ClientManager ClientManager
get { return m_clientManager; } //{
} // get { return m_clientManager; }
//}
public PacketServer(ClientStackNetworkHandler networkHandler) public PacketServer(ClientStackNetworkHandler networkHandler)
{ {
@ -57,7 +58,7 @@ namespace OpenSim.Region.ClientStack
{ {
set set
{ {
this._localScene = value; this.m_scene = value;
} }
} }
@ -68,7 +69,7 @@ namespace OpenSim.Region.ClientStack
/// <param name="packet"></param> /// <param name="packet"></param>
public virtual void InPacket(uint circuitCode, Packet packet) public virtual void InPacket(uint circuitCode, Packet packet)
{ {
m_clientManager.InPacket(circuitCode, packet); m_scene.ClientManager.InPacket(circuitCode, packet);
} }
protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions)
@ -76,28 +77,27 @@ namespace OpenSim.Region.ClientStack
return new ClientView(remoteEP, initialcirpack, clientManager, scene, assetCache, packServer, authenSessions ); return new ClientView(remoteEP, initialcirpack, clientManager, scene, assetCache, packServer, authenSessions );
} }
/// <summary>
///
/// </summary>
/// <param name="epSender"></param>
/// <param name="useCircuit"></param>
/// <param name="assetCache"></param>
/// <param name="inventoryCache"></param>
/// <param name="authenticateSessionsClass"></param>
/// <returns></returns>
public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, AgentCircuitManager authenticateSessionsClass) public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, AgentCircuitManager authenticateSessionsClass)
{ {
IClientAPI newuser = IClientAPI newuser;
CreateNewClient(epSender, useCircuit, m_clientManager, _localScene, assetCache, this,
authenticateSessionsClass);
this.m_clientManager.Add(useCircuit.CircuitCode.Code, newuser); if (m_scene.ClientManager.TryGetClient(useCircuit.CircuitCode.Code, out newuser))
{
return false;
}
else
{
newuser = CreateNewClient(epSender, useCircuit, m_scene.ClientManager, m_scene, assetCache, this,
authenticateSessionsClass);
newuser.OnViewerEffect += m_clientManager.ViewerEffectHandler; m_scene.ClientManager.Add(useCircuit.CircuitCode.Code, newuser);
newuser.OnLogout += LogoutHandler;
newuser.OnConnectionClosed += CloseClient;
return true; newuser.OnViewerEffect += m_scene.ClientManager.ViewerEffectHandler;
newuser.OnLogout += LogoutHandler;
newuser.OnConnectionClosed += CloseClient;
return true;
}
} }
public void LogoutHandler(IClientAPI client) public void LogoutHandler(IClientAPI client)
@ -127,7 +127,7 @@ namespace OpenSim.Region.ClientStack
public virtual void CloseCircuit(uint circuitcode) public virtual void CloseCircuit(uint circuitcode)
{ {
m_networkHandler.RemoveClientCircuit( circuitcode ); m_networkHandler.RemoveClientCircuit( circuitcode );
m_clientManager.CloseAllAgents( circuitcode ); m_scene.ClientManager.CloseAllAgents(circuitcode);
} }
public virtual void CloseClient( IClientAPI client ) public virtual void CloseClient( IClientAPI client )

View File

@ -30,14 +30,15 @@ using libsecondlife;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Types; using OpenSim.Framework.Types;
using System.Collections;
namespace OpenSim.Region.Communications.Local namespace OpenSim.Region.Communications.Local
{ {
public class LocalBackEndServices : IGridServices, IInterRegionCommunications public class LocalBackEndServices : IGridServices, IInterRegionCommunications
{ {
protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>(); protected Dictionary<ulong, RegionInfo> m_regions = new Dictionary<ulong, RegionInfo>();
protected Dictionary<ulong, RegionCommsListener> regionHosts = new Dictionary<ulong, RegionCommsListener>(); protected Dictionary<ulong, RegionCommsListener> m_regionListeners = new Dictionary<ulong, RegionCommsListener>();
public LocalBackEndServices() public LocalBackEndServices()
{ {
@ -52,12 +53,13 @@ namespace OpenSim.Region.Communications.Local
public RegionCommsListener RegisterRegion(RegionInfo regionInfo) public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
{ {
//Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) if (!this.m_regions.ContainsKey((uint)regionInfo.RegionHandle))
{ {
//Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle );
this.regions.Add(regionInfo.RegionHandle, regionInfo); this.m_regions.Add(regionInfo.RegionHandle, regionInfo);
RegionCommsListener regionHost = new RegionCommsListener(); RegionCommsListener regionHost = new RegionCommsListener();
this.regionHosts.Add(regionInfo.RegionHandle, regionHost); this.m_regionListeners.Add(regionInfo.RegionHandle, regionHost);
return regionHost; return regionHost;
} }
@ -75,7 +77,7 @@ namespace OpenSim.Region.Communications.Local
// Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle); // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle);
List<RegionInfo> neighbours = new List<RegionInfo>(); List<RegionInfo> neighbours = new List<RegionInfo>();
foreach (RegionInfo reg in this.regions.Values) foreach (RegionInfo reg in this.m_regions.Values)
{ {
// Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY); // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY);
if (reg.RegionHandle != regionInfo.RegionHandle) if (reg.RegionHandle != regionInfo.RegionHandle)
@ -100,9 +102,9 @@ namespace OpenSim.Region.Communications.Local
/// <returns></returns> /// <returns></returns>
public RegionInfo RequestNeighbourInfo(ulong regionHandle) public RegionInfo RequestNeighbourInfo(ulong regionHandle)
{ {
if (this.regions.ContainsKey(regionHandle)) if (this.m_regions.ContainsKey(regionHandle))
{ {
return this.regions[regionHandle]; return this.m_regions[regionHandle];
} }
return null; return null;
} }
@ -118,7 +120,7 @@ namespace OpenSim.Region.Communications.Local
public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
{ {
List<MapBlockData> mapBlocks = new List<MapBlockData>(); List<MapBlockData> mapBlocks = new List<MapBlockData>();
foreach(RegionInfo regInfo in this.regions.Values) foreach(RegionInfo regInfo in this.m_regions.Values)
{ {
if (((regInfo.RegionLocX >= minX) && (regInfo.RegionLocX <= maxX)) && ((regInfo.RegionLocY >= minY) && (regInfo.RegionLocY <= maxY))) if (((regInfo.RegionLocX >= minX) && (regInfo.RegionLocX <= maxX)) && ((regInfo.RegionLocY >= minY) && (regInfo.RegionLocY <= maxY)))
{ {
@ -145,10 +147,10 @@ namespace OpenSim.Region.Communications.Local
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
{ {
//Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent");
if (this.regionHosts.ContainsKey(regionHandle)) if (this.m_regionListeners.ContainsKey(regionHandle))
{ {
// Console.WriteLine("CommsManager- Informing a region to expect child agent"); // Console.WriteLine("CommsManager- Informing a region to expect child agent");
this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agentData); this.m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
return true; return true;
} }
return false; return false;
@ -163,18 +165,18 @@ namespace OpenSim.Region.Communications.Local
/// <returns></returns> /// <returns></returns>
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{ {
if (this.regionHosts.ContainsKey(regionHandle)) if (this.m_regionListeners.ContainsKey(regionHandle))
{ {
// Console.WriteLine("CommsManager- Informing a region to expect avatar crossing"); // Console.WriteLine("CommsManager- Informing a region to expect avatar crossing");
this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying); this.m_regionListeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
return true; return true;
} }
return false; return false;
} }
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID) public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
{ {
if (this.regionHosts.ContainsKey(regionHandle)) if (this.m_regionListeners.ContainsKey(regionHandle))
{ {
return true; return true;
} }
@ -201,11 +203,54 @@ namespace OpenSim.Region.Communications.Local
agent.startpos = new LLVector3(128, 128, 70); agent.startpos = new LLVector3(128, 128, 70);
agent.CapsPath = loginData.CapsPath; agent.CapsPath = loginData.CapsPath;
if (this.regionHosts.ContainsKey(regionHandle)) TriggerExpectUser(regionHandle, agent);
}
public void TriggerExpectUser(ulong regionHandle, AgentCircuitData agent)
{
if (this.m_regionListeners.ContainsKey(regionHandle))
{ {
this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agent); this.m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent);
} }
} }
public void PingCheckReply(Hashtable respData)
{
foreach (ulong region in this.m_regions.Keys )
{
Hashtable regData = new Hashtable();
RegionInfo reg = m_regions[region];
regData["status"] = "active";
regData["handle"] = region.ToString();
respData[reg.SimUUID.ToStringHyphenated()] = regData;
}
}
public bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
if ( m_regionListeners.ContainsKey(regionHandle))
{
return m_regionListeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position,
isFlying);
}
return false;
}
public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
{
if (m_regionListeners.ContainsKey(regionHandle))
{
TriggerExpectUser(regionHandle, agentData);
return true;
}
return false;
}
} }
} }

View File

@ -12,13 +12,13 @@ using OpenSim.Framework.Communications;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Types; using OpenSim.Framework.Types;
using OpenSim.Region.Communications.Local;
namespace OpenSim.Region.Communications.OGS1 namespace OpenSim.Region.Communications.OGS1
{ {
public class OGS1GridServices : IGridServices, IInterRegionCommunications public class OGS1GridServices : IGridServices, IInterRegionCommunications
{ {
public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>(); private LocalBackEndServices m_localBackend = new LocalBackEndServices();
protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>();
public BaseHttpServer httpListener; public BaseHttpServer httpListener;
public NetworkServersInfo serversInfo; public NetworkServersInfo serversInfo;
@ -35,6 +35,7 @@ namespace OpenSim.Region.Communications.OGS1
httpServer = httpServe; httpServer = httpServe;
httpServer.AddXmlRPCHandler("expect_user", this.ExpectUser); httpServer.AddXmlRPCHandler("expect_user", this.ExpectUser);
httpServer.AddXmlRPCHandler("check", this.PingCheckReply); httpServer.AddXmlRPCHandler("check", this.PingCheckReply);
this.StartRemoting(); this.StartRemoting();
} }
@ -45,11 +46,6 @@ namespace OpenSim.Region.Communications.OGS1
/// <returns></returns> /// <returns></returns>
public RegionCommsListener RegisterRegion(RegionInfo regionInfo) public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
{ {
if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
{
this.regions.Add(regionInfo.RegionHandle, regionInfo);
}
Hashtable GridParams = new Hashtable(); Hashtable GridParams = new Hashtable();
// Login / Authentication // Login / Authentication
@ -83,18 +79,7 @@ namespace OpenSim.Region.Communications.OGS1
return null; return null;
} }
// Initialise the background listeners return m_localBackend.RegisterRegion(regionInfo);
RegionCommsListener regListener = new RegionCommsListener();
if (!this.listeners.ContainsKey(regionInfo.RegionHandle))
{
this.listeners.Add(regionInfo.RegionHandle, regListener);
}
else
{
listeners[regionInfo.RegionHandle] = regListener;
}
return regListener;
} }
/// <summary> /// <summary>
@ -133,7 +118,7 @@ namespace OpenSim.Region.Communications.OGS1
neighbour.RegionName = (string)neighbourData["name"]; neighbour.RegionName = (string)neighbourData["name"];
//OGS1+ //OGS1+
neighbour.SimUUID = new LLUUID((string) neighbourData["uuid"]); neighbour.SimUUID = new LLUUID((string)neighbourData["uuid"]);
neighbours.Add(neighbour); neighbours.Add(neighbour);
} }
@ -150,9 +135,11 @@ namespace OpenSim.Region.Communications.OGS1
/// <returns></returns> /// <returns></returns>
public RegionInfo RequestNeighbourInfo(ulong regionHandle) public RegionInfo RequestNeighbourInfo(ulong regionHandle)
{ {
if (this.regions.ContainsKey(regionHandle)) RegionInfo regionInfo = m_localBackend.RequestNeighbourInfo(regionHandle);
if (regionInfo != null)
{ {
return this.regions[regionHandle]; return regionInfo;
} }
Hashtable requestData = new Hashtable(); Hashtable requestData = new Hashtable();
@ -179,7 +166,7 @@ namespace OpenSim.Region.Communications.OGS1
IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port); IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port);
string neighbourExternalUri = externalUri; string neighbourExternalUri = externalUri;
RegionInfo regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr);
regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
regionInfo.RemotingAddress = internalIpStr; regionInfo.RemotingAddress = internalIpStr;
@ -245,7 +232,7 @@ namespace OpenSim.Region.Communications.OGS1
IList parameters = new ArrayList(); IList parameters = new ArrayList();
parameters.Add(param); parameters.Add(param);
XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); XmlRpcRequest req = new XmlRpcRequest("map_block", parameters);
XmlRpcResponse resp = req.Send(serversInfo.GridURL, 3000); XmlRpcResponse resp = req.Send(serversInfo.GridURL, 10000);
Hashtable respData = (Hashtable)resp.Value; Hashtable respData = (Hashtable)resp.Value;
return respData; return respData;
} }
@ -262,15 +249,7 @@ namespace OpenSim.Region.Communications.OGS1
Hashtable respData = new Hashtable(); Hashtable respData = new Hashtable();
respData["online"] = "true"; respData["online"] = "true";
foreach (ulong region in this.listeners.Keys) m_localBackend.PingCheckReply(respData);
{
Hashtable regData = new Hashtable();
RegionInfo reg = regions[region];
regData["status"] = "active";
regData["handle"] = region.ToString();
respData[reg.SimUUID.ToStringHyphenated()] = regData;
}
response.Value = respData; response.Value = respData;
@ -308,14 +287,9 @@ namespace OpenSim.Region.Communications.OGS1
} }
if (listeners.ContainsKey(Convert.ToUInt64((string)requestData["regionhandle"]))) ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]);
{
this.listeners[Convert.ToUInt64((string)requestData["regionhandle"])].TriggerExpectUser(Convert.ToUInt64((string)requestData["regionhandle"]), agentData); m_localBackend.TriggerExpectUser(regionHandle, agentData);
}
else
{
MainLog.Instance.Error("ExpectUser() - Unknown region " + (Convert.ToUInt64(requestData["regionhandle"])).ToString());
}
MainLog.Instance.Verbose("ExpectUser() - Welcoming new user..."); MainLog.Instance.Verbose("ExpectUser() - Welcoming new user...");
@ -333,7 +307,7 @@ namespace OpenSim.Region.Communications.OGS1
WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton);
RemotingConfiguration.RegisterWellKnownServiceType(wellType); RemotingConfiguration.RegisterWellKnownServiceType(wellType);
InterRegionSingleton.Instance.OnArrival += this.IncomingArrival; InterRegionSingleton.Instance.OnArrival += this.TriggerExpectAvatarCrossing;
InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent; InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent;
} }
@ -348,11 +322,11 @@ namespace OpenSim.Region.Communications.OGS1
{ {
try try
{ {
if (this.listeners.ContainsKey(regionHandle)) if (m_localBackend.InformRegionOfChildAgent(regionHandle, agentData))
{ {
this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
return true; return true;
} }
RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle); RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
if (regInfo != null) if (regInfo != null)
{ {
@ -401,11 +375,11 @@ namespace OpenSim.Region.Communications.OGS1
{ {
try try
{ {
if (this.listeners.ContainsKey(regionHandle)) if (m_localBackend.TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying))
{ {
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
return true; return true;
} }
RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle); RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
if (regInfo != null) if (regInfo != null)
{ {
@ -440,14 +414,11 @@ namespace OpenSim.Region.Communications.OGS1
} }
} }
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID) public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId)
{ {
if (this.listeners.ContainsKey(regionHandle)) return m_localBackend.AcknowledgeAgentCrossed(regionHandle, agentId);
{
return true;
}
return false;
} }
#endregion #endregion
#region Methods triggered by calls from external instances #region Methods triggered by calls from external instances
@ -461,17 +432,13 @@ namespace OpenSim.Region.Communications.OGS1
{ {
try try
{ {
if (this.listeners.ContainsKey(regionHandle)) return m_localBackend.IncomingChildAgent(regionHandle, agentData);
{
this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
return true;
}
} }
catch (System.Runtime.Remoting.RemotingException e) catch (System.Runtime.Remoting.RemotingException e)
{ {
MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString());
return false;
} }
return false;
} }
/// <summary> /// <summary>
@ -481,21 +448,18 @@ namespace OpenSim.Region.Communications.OGS1
/// <param name="agentID"></param> /// <param name="agentID"></param>
/// <param name="position"></param> /// <param name="position"></param>
/// <returns></returns> /// <returns></returns>
public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) public bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{ {
try try
{ {
if (this.listeners.ContainsKey(regionHandle)) return m_localBackend.TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
{
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
return true;
}
} }
catch (System.Runtime.Remoting.RemotingException e) catch (System.Runtime.Remoting.RemotingException e)
{ {
MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); MainLog.Instance.Error("Remoting Error: Unable to connect to remote region.\n" + e.ToString());
return false;
} }
return false;
} }
#endregion #endregion
#endregion #endregion

View File

@ -54,7 +54,6 @@ namespace OpenSim.Region.Environment.Scenes
{ {
public partial class Scene : SceneBase public partial class Scene : SceneBase
{ {
public delegate bool FilterAvatarList(ScenePresence avatar); public delegate bool FilterAvatarList(ScenePresence avatar);
protected Timer m_heartbeatTimer = new Timer(); protected Timer m_heartbeatTimer = new Timer();

View File

@ -33,11 +33,18 @@ using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types; using OpenSim.Framework.Types;
using OpenSim.Region.Terrain; using OpenSim.Region.Terrain;
using OpenSim.Framework;
namespace OpenSim.Region.Environment.Scenes namespace OpenSim.Region.Environment.Scenes
{ {
public abstract class SceneBase : IScene public abstract class SceneBase : IScene
{ {
private readonly ClientManager m_clientManager = new ClientManager();
public ClientManager ClientManager
{
get { return m_clientManager; }
}
public Dictionary<LLUUID, EntityBase> Entities; public Dictionary<LLUUID, EntityBase> Entities;
protected ulong m_regionHandle; protected ulong m_regionHandle;
protected string m_regionName; protected string m_regionName;