* Stop the pointless passing of a scene's own region handler back to it in region comms

* Some scene methods ignored it, others did nothing if the region handler given did not match their own (which would never be triggered)
0.6.1-post-fixes
Justin Clarke Casey 2008-11-12 19:12:33 +00:00
parent 724390e413
commit b636bb0f9e
7 changed files with 167 additions and 166 deletions

View File

@ -30,27 +30,27 @@ using OpenMetaverse;
namespace OpenSim.Framework
{
public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent);
public delegate void ExpectUserDelegate(AgentCircuitData agent);
public delegate bool ExpectPrimDelegate(ulong regionHandle, UUID primID, string objData, int XMLMethod);
public delegate bool ExpectPrimDelegate(UUID primID, string objData, int XMLMethod);
public delegate void UpdateNeighbours(List<RegionInfo> neighbours);
public delegate void AgentCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying);
public delegate void AgentCrossing(UUID agentID, Vector3 position, bool isFlying);
public delegate void PrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isPhysical);
public delegate void PrimCrossing(UUID primID, Vector3 position, bool isPhysical);
public delegate void AcknowledgeAgentCross(ulong regionHandle, UUID agentID);
public delegate void AcknowledgeAgentCross(UUID agentID);
public delegate void AcknowledgePrimCross(ulong regionHandle, UUID PrimID);
public delegate void AcknowledgePrimCross(UUID PrimID);
public delegate bool CloseAgentConnection(ulong regionHandle, UUID agentID);
public delegate bool CloseAgentConnection(UUID agentID);
public delegate bool RegionUp(RegionInfo region);
public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData);
public delegate bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData);
public delegate void LogOffUser(ulong regionHandle, UUID agentID, UUID regionSecret, string message);
public delegate void LogOffUser(UUID agentID, UUID regionSecret, string message);
public delegate LandData GetLandData(uint x, uint y);

View File

@ -31,6 +31,9 @@ using OpenMetaverse;
namespace OpenSim.Framework
{
/// <summary>
/// Sandbox mode region comms listener. There is one of these per region
/// </summary>
public class RegionCommsListener : IRegionCommsListener
{
public string debugRegionName = String.Empty;
@ -71,12 +74,12 @@ namespace OpenSim.Framework
/// </summary>
/// <param name="agent"></param>
/// <returns></returns>
public virtual bool TriggerExpectUser(ulong regionHandle, AgentCircuitData agent)
public virtual bool TriggerExpectUser(AgentCircuitData agent)
{
handlerExpectUser = OnExpectUser;
if (handlerExpectUser != null)
{
handlerExpectUser(regionHandle, agent);
handlerExpectUser(agent);
return true;
}
@ -84,23 +87,22 @@ namespace OpenSim.Framework
}
// From User Server
public virtual void TriggerLogOffUser(ulong regionHandle, UUID agentID, UUID RegionSecret, string message)
public virtual void TriggerLogOffUser(UUID agentID, UUID RegionSecret, string message)
{
handlerLogOffUser = OnLogOffUser;
if (handlerLogOffUser != null)
{
handlerLogOffUser(regionHandle, agentID, RegionSecret, message);
handlerLogOffUser(agentID, RegionSecret, message);
}
}
public virtual bool TriggerExpectPrim(ulong regionHandle, UUID primID, string objData, int XMLMethod)
public virtual bool TriggerExpectPrim(UUID primID, string objData, int XMLMethod)
{
handlerExpectPrim = OnExpectPrim;
if (handlerExpectPrim != null)
{
handlerExpectPrim(regionHandle, primID, objData, XMLMethod);
handlerExpectPrim(primID, objData, XMLMethod);
return true;
}
return false;
@ -117,69 +119,68 @@ namespace OpenSim.Framework
return false;
}
public virtual bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData)
{
handlerChildAgentUpdate = OnChildAgentUpdate;
if (handlerChildAgentUpdate != null)
{
handlerChildAgentUpdate(regionHandle, cAgentData);
handlerChildAgentUpdate(cAgentData);
return true;
}
return false;
}
public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position,
bool isFlying)
public virtual bool TriggerExpectAvatarCrossing(UUID agentID, Vector3 position, bool isFlying)
{
handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion;
if (handlerAvatarCrossingIntoRegion != null)
{
handlerAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying);
handlerAvatarCrossingIntoRegion(agentID, position, isFlying);
return true;
}
return false;
}
public virtual bool TriggerExpectPrimCrossing(ulong regionHandle, UUID primID, Vector3 position,
public virtual bool TriggerExpectPrimCrossing(UUID primID, Vector3 position,
bool isPhysical)
{
handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion;
if (handlerPrimCrossingIntoRegion != null)
{
handlerPrimCrossingIntoRegion(regionHandle, primID, position, isPhysical);
handlerPrimCrossingIntoRegion(primID, position, isPhysical);
return true;
}
return false;
}
public virtual bool TriggerAcknowledgeAgentCrossed(ulong regionHandle, UUID agentID)
public virtual bool TriggerAcknowledgeAgentCrossed(UUID agentID)
{
handlerAcknowledgeAgentCrossed = OnAcknowledgeAgentCrossed;
if (handlerAcknowledgeAgentCrossed != null)
{
handlerAcknowledgeAgentCrossed(regionHandle, agentID);
handlerAcknowledgeAgentCrossed(agentID);
return true;
}
return false;
}
public virtual bool TriggerAcknowledgePrimCrossed(ulong regionHandle, UUID primID)
public virtual bool TriggerAcknowledgePrimCrossed(UUID primID)
{
handlerAcknowledgePrimCrossed = OnAcknowledgePrimCrossed;
if (handlerAcknowledgePrimCrossed != null)
{
handlerAcknowledgePrimCrossed(regionHandle, primID);
handlerAcknowledgePrimCrossed(primID);
return true;
}
return false;
}
public virtual bool TriggerCloseAgentConnection(ulong regionHandle, UUID agentID)
public virtual bool TriggerCloseAgentConnection(UUID agentID)
{
handlerCloseAgentConnection = OnCloseAgentConnection;
if (handlerCloseAgentConnection != null)
{
handlerCloseAgentConnection(regionHandle, agentID);
handlerCloseAgentConnection(agentID);
return true;
}
return false;
@ -220,11 +221,11 @@ namespace OpenSim.Framework
return false;
}
public bool TriggerTellRegionToCloseChildConnection(ulong regionHandle, UUID agentID)
public bool TriggerTellRegionToCloseChildConnection(UUID agentID)
{
handlerCloseAgentConnection = OnCloseAgentConnection;
if (handlerCloseAgentConnection != null)
return handlerCloseAgentConnection(regionHandle, agentID);
return handlerCloseAgentConnection(agentID);
return false;
}

View File

@ -163,7 +163,7 @@ namespace OpenSim
presence.UUID,
regionInfo.RegionName));
presence.Scene.CloseConnection(regionInfo.RegionHandle, presence.UUID);
presence.Scene.CloseConnection(presence.UUID);
}
}
m_console.Notice("");

View File

@ -167,7 +167,7 @@ namespace OpenSim.Region.Communications.Local
}
/// <summary>
///
/// Get information about a neighbouring region
/// </summary>
/// <param name="regionHandle"></param>
/// <returns></returns>
@ -177,9 +177,15 @@ namespace OpenSim.Region.Communications.Local
{
return m_regions[regionHandle];
}
return null;
}
/// <summary>
/// Get information about a neighbouring region
/// </summary>
/// <param name="regionHandle"></param>
/// <returns></returns>
public RegionInfo RequestNeighbourInfo(UUID regionID)
{
// TODO add a dictionary for faster lookup
@ -188,9 +194,15 @@ namespace OpenSim.Region.Communications.Local
if (info.RegionID == regionID)
return info;
}
return null;
}
/// <summary>
/// Get information about the closet region given a region name.
/// </summary>
/// <param name="regionName"></param>
/// <returns></returns>
public RegionInfo RequestClosestRegion(string regionName)
{
foreach (RegionInfo regInfo in m_regions.Values)
@ -236,7 +248,7 @@ namespace OpenSim.Region.Communications.Local
{
if (m_regionListeners.ContainsKey(regionHandle))
{
return m_regionListeners[regionHandle].TriggerTellRegionToCloseChildConnection(regionHandle, agentID);
return m_regionListeners[regionHandle].TriggerTellRegionToCloseChildConnection(agentID);
}
return false;
}
@ -263,7 +275,7 @@ namespace OpenSim.Region.Communications.Local
if (m_regionListeners.ContainsKey(regionHandle))
{
// Console.WriteLine("CommsManager- Informing a region to expect child agent");
m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData);
m_regionListeners[regionHandle].TriggerChildAgentUpdate(cAgentData);
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname);
return true;
@ -285,7 +297,7 @@ namespace OpenSim.Region.Communications.Local
return returnGridSettings;
}
public virtual void SetForcefulBanlistsDisallowed(ulong regionHandle)
public virtual void SetForcefulBanlistsDisallowed()
{
m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE");
}
@ -304,8 +316,9 @@ namespace OpenSim.Region.Communications.Local
{
if (m_regionListeners.ContainsKey(regionHandle))
{
return m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData);
return m_regionListeners[regionHandle].TriggerChildAgentUpdate(cAgentData);
}
return false;
}
@ -313,8 +326,9 @@ namespace OpenSim.Region.Communications.Local
{
if (m_regionListeners.ContainsKey(regionHandle))
{
return m_regionListeners[regionHandle].TriggerTellRegionToCloseChildConnection(regionHandle, agentID);
return m_regionListeners[regionHandle].TriggerTellRegionToCloseChildConnection(agentID);
}
return false;
}
@ -333,7 +347,7 @@ namespace OpenSim.Region.Communications.Local
if (m_regionListeners.ContainsKey(regionHandle))
{
// Console.WriteLine("CommsManager- Informing a region to expect child agent");
m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
m_regionListeners[regionHandle].TriggerExpectUser(agentData);
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname);
return true;
@ -345,14 +359,15 @@ namespace OpenSim.Region.Communications.Local
{
if (m_regionListeners.ContainsKey(regionHandle))
{
m_regionListeners[regionHandle].TriggerExpectPrim(regionHandle, primID, objData, XMLMethod);
m_regionListeners[regionHandle].TriggerExpectPrim(primID, objData, XMLMethod);
return true;
}
return false;
}
/// <summary>
///
/// Tell a region to get prepare for an avatar to cross into it.
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentID"></param>
@ -363,7 +378,7 @@ namespace OpenSim.Region.Communications.Local
if (m_regionListeners.ContainsKey(regionHandle))
{
// Console.WriteLine("CommsManager- Informing a region to expect avatar crossing");
m_regionListeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
m_regionListeners[regionHandle].TriggerExpectAvatarCrossing(agentID, position, isFlying);
return true;
}
return false;
@ -373,9 +388,10 @@ namespace OpenSim.Region.Communications.Local
{
if (m_regionListeners.ContainsKey(regionHandle))
{
m_regionListeners[regionHandle].TriggerExpectPrimCrossing(regionHandle, primID, position, isPhysical);
m_regionListeners[regionHandle].TriggerExpectPrimCrossing(primID, position, isPhysical);
return true;
}
return false;
}
@ -429,7 +445,7 @@ namespace OpenSim.Region.Communications.Local
{
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname);
m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent);
m_regionListeners[regionHandle].TriggerExpectUser(agent);
}
}
@ -439,7 +455,7 @@ namespace OpenSim.Region.Communications.Local
{
//m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname);
m_regionListeners[regionHandle].TriggerLogOffUser(regionHandle, agentID, RegionSecret, message);
m_regionListeners[regionHandle].TriggerLogOffUser(agentID, RegionSecret, message);
}
}
@ -447,7 +463,7 @@ namespace OpenSim.Region.Communications.Local
{
if (m_regionListeners.ContainsKey(regionHandle))
{
m_regionListeners[regionHandle].TriggerExpectPrim(regionHandle, primID, objData, XMLMethod);
m_regionListeners[regionHandle].TriggerExpectPrim(primID, objData, XMLMethod);
}
}
@ -468,8 +484,7 @@ namespace OpenSim.Region.Communications.Local
{
if (m_regionListeners.ContainsKey(regionHandle))
{
return m_regionListeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position,
isFlying);
return m_regionListeners[regionHandle].TriggerExpectAvatarCrossing(agentID, position, isFlying);
}
return false;
@ -480,7 +495,7 @@ namespace OpenSim.Region.Communications.Local
if (m_regionListeners.ContainsKey(regionHandle))
{
return
m_regionListeners[regionHandle].TriggerExpectPrimCrossing(regionHandle, primID, position, isPhysical);
m_regionListeners[regionHandle].TriggerExpectPrimCrossing(primID, position, isPhysical);
}
return false;
}

View File

@ -546,7 +546,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(agentData.AgentID, userProfile);
// Call 'new user' event handler
homeScene.NewUserConnection(reg.RegionHandle, agentData);
homeScene.NewUserConnection(agentData);
//string raCap = string.Empty;

View File

@ -2106,9 +2106,10 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="objXMLData"></param>
/// <param name="XMLMethod"></param>
/// <returns></returns>
public bool IncomingInterRegionPrimGroup(ulong regionHandle, UUID primID, string objXMLData, int XMLMethod)
public bool IncomingInterRegionPrimGroup(UUID primID, string objXMLData, int XMLMethod)
{
m_log.Warn("[INTERREGION]: A new prim arrived from a neighbor");
m_log.DebugFormat("[INTERREGION]: A new prim {0} arrived from a neighbor", primID);
if (XMLMethod == 0)
{
SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData);
@ -2702,51 +2703,42 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agent"></param>
public void NewUserConnection(ulong regionHandle, AgentCircuitData agent)
public void NewUserConnection(AgentCircuitData agent)
{
if (regionHandle == m_regInfo.RegionHandle)
if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
{
if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
m_log.WarnFormat(
"[CONNECTION DEBUGGING]: Denied access to: {0} at {1} because the user is on the region banlist",
agent.AgentID, RegionInfo.RegionName);
}
capsPaths[agent.AgentID] = agent.CapsPath;
if (!agent.child)
{
AddCapsHandler(agent.AgentID);
// Honor parcel landing type and position.
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
if (land != null)
{
m_log.WarnFormat(
"[CONNECTION DEBUGGING]: Denied access to: {0} [{1}] at {2} because the user is on the region banlist",
agent.AgentID, regionHandle, RegionInfo.RegionName);
}
capsPaths[agent.AgentID] = agent.CapsPath;
if (!agent.child)
{
AddCapsHandler(agent.AgentID);
// Honor parcel landing type and position.
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
if (land != null)
if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != Vector3.Zero)
{
if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != Vector3.Zero)
{
agent.startpos = land.landData.UserLocation;
}
agent.startpos = land.landData.UserLocation;
}
}
}
m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
// rewrite session_id
CachedUserInfo userinfo = CommsManager.UserProfileCacheService.GetUserDetails(agent.AgentID);
if (userinfo != null)
{
userinfo.SessionID = agent.SessionID;
}
else
{
m_log.WarnFormat("[USERINFO CACHE]: We couldn't find a User Info record for {0}. This is usually an indication that the UUID we're looking up is invalid", agent.AgentID);
}
m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
// rewrite session_id
CachedUserInfo userinfo = CommsManager.UserProfileCacheService.GetUserDetails(agent.AgentID);
if (userinfo != null)
{
userinfo.SessionID = agent.SessionID;
}
else
{
m_log.WarnFormat(
"[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}",
agent.AgentID, regionHandle, RegionInfo.RegionName);
m_log.WarnFormat("[USERINFO CACHE]: We couldn't find a User Info record for {0}. This is usually an indication that the UUID we're looking up is invalid", agent.AgentID);
}
}
@ -2760,31 +2752,28 @@ namespace OpenSim.Region.Environment.Scenes
return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc);
}
protected void HandleLogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message)
protected void HandleLogOffUserFromGrid(UUID AvatarID, UUID RegionSecret, string message)
{
if (RegionInfo.RegionHandle == regionHandle)
ScenePresence loggingOffUser = null;
loggingOffUser = GetScenePresence(AvatarID);
if (loggingOffUser != null)
{
ScenePresence loggingOffUser = null;
loggingOffUser = GetScenePresence(AvatarID);
if (loggingOffUser != null)
if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId)
{
if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId)
{
loggingOffUser.ControllingClient.Kick(message);
// Give them a second to receive the message!
System.Threading.Thread.Sleep(1000);
loggingOffUser.ControllingClient.Close(true);
}
else
{
m_log.Info("[USERLOGOFF]: System sending the LogOff user message failed to sucessfully authenticate");
}
loggingOffUser.ControllingClient.Kick(message);
// Give them a second to receive the message!
System.Threading.Thread.Sleep(1000);
loggingOffUser.ControllingClient.Close(true);
}
else
{
m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString());
m_log.Info("[USERLOGOFF]: System sending the LogOff user message failed to sucessfully authenticate");
}
}
else
{
m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString());
}
}
/// <summary>
@ -2865,42 +2854,38 @@ namespace OpenSim.Region.Environment.Scenes
/// <summary>
/// Triggered when an agent crosses into this sim. Also happens on initial login.
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentID"></param>
/// <param name="position"></param>
/// <param name="isFlying"></param>
public virtual void AgentCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying)
{
if (regionHandle == m_regInfo.RegionHandle)
ScenePresence presence;
lock (m_scenePresences)
{
ScenePresence presence;
lock (m_scenePresences)
m_scenePresences.TryGetValue(agentID, out presence);
}
if (presence != null)
{
try
{
m_scenePresences.TryGetValue(agentID, out presence);
presence.MakeRootAgent(position, isFlying);
}
if (presence != null)
catch (Exception e)
{
try
{
presence.MakeRootAgent(position, isFlying);
}
catch (Exception e)
{
m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}", e);
}
}
else
{
m_log.ErrorFormat(
"[SCENE]: Could not find presence for agent {0} crossing into scene {1}",
agentID, RegionInfo.RegionName);
m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}", e);
}
}
else
{
m_log.ErrorFormat(
"[SCENE]: Could not find presence for agent {0} crossing into scene {1}",
agentID, RegionInfo.RegionName);
}
}
public virtual bool IncomingChildAgentDataUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
public virtual bool IncomingChildAgentDataUpdate(ChildAgentDataUpdate cAgentData)
{
ScenePresence childAgentUpdate = GetScenePresence(new UUID(cAgentData.AgentID));
if (childAgentUpdate != null)
@ -2918,8 +2903,10 @@ namespace OpenSim.Region.Environment.Scenes
// Not Implemented:
//TODO: Do we need to pass the message on to one of our neighbors?
}
return true;
}
return false;
}
@ -2928,29 +2915,28 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentID"></param>
public bool CloseConnection(ulong regionHandle, UUID agentID)
public bool CloseConnection(UUID agentID)
{
if (regionHandle == m_regionHandle)
ScenePresence presence = m_innerScene.GetScenePresence(agentID);
if (presence != null)
{
ScenePresence presence = m_innerScene.GetScenePresence(agentID);
if (presence != null)
{
// Nothing is removed here, so down count it as such
// if (presence.IsChildAgent)
// {
// m_innerScene.removeUserCount(false);
// }
// else
// {
// m_innerScene.removeUserCount(true);
// }
// Nothing is removed here, so down count it as such
// if (presence.IsChildAgent)
// {
// m_innerScene.removeUserCount(false);
// }
// else
// {
// m_innerScene.removeUserCount(true);
// }
// Tell a single agent to disconnect from the region.
presence.ControllingClient.SendShutdownConnectionNotice();
// Tell a single agent to disconnect from the region.
presence.ControllingClient.SendShutdownConnectionNotice();
presence.ControllingClient.Close(true);
}
presence.ControllingClient.Close(true);
}
return true;
}

View File

@ -155,22 +155,22 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="regionHandle"></param>
/// <param name="agent"></param>
///
protected void NewUserConnection(ulong regionHandle, AgentCircuitData agent)
protected void NewUserConnection(AgentCircuitData agent)
{
handlerExpectUser = OnExpectUser;
if (handlerExpectUser != null)
{
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname);
handlerExpectUser(regionHandle, agent);
handlerExpectUser(agent);
}
}
protected void GridLogOffUser(ulong regionHandle, UUID AgentID, UUID RegionSecret, string message)
protected void GridLogOffUser(UUID AgentID, UUID RegionSecret, string message)
{
handlerLogOffUser = OnLogOffUser;
if (handlerLogOffUser != null)
{
handlerLogOffUser(regionHandle, AgentID, RegionSecret, message);
handlerLogOffUser(AgentID, RegionSecret, message);
}
}
@ -185,31 +185,31 @@ namespace OpenSim.Region.Environment.Scenes
return true;
}
protected bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
protected bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData)
{
handlerChildAgentUpdate = OnChildAgentUpdate;
if (handlerChildAgentUpdate != null)
handlerChildAgentUpdate(regionHandle, cAgentData);
handlerChildAgentUpdate(cAgentData);
return true;
}
protected void AgentCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
protected void AgentCrossing(UUID agentID, Vector3 position, bool isFlying)
{
handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion;
if (handlerAvatarCrossingIntoRegion != null)
{
handlerAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying);
handlerAvatarCrossingIntoRegion(agentID, position, isFlying);
}
}
protected bool IncomingPrimCrossing(ulong regionHandle, UUID primID, String objXMLData, int XMLMethod)
protected bool IncomingPrimCrossing(UUID primID, String objXMLData, int XMLMethod)
{
handlerExpectPrim = OnExpectPrim;
if (handlerExpectPrim != null)
{
return handlerExpectPrim(regionHandle, primID, objXMLData, XMLMethod);
return handlerExpectPrim(primID, objXMLData, XMLMethod);
}
else
{
@ -218,23 +218,25 @@ namespace OpenSim.Region.Environment.Scenes
}
protected void PrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isPhysical)
protected void PrimCrossing(UUID primID, Vector3 position, bool isPhysical)
{
handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion;
if (handlerPrimCrossingIntoRegion != null)
{
handlerPrimCrossingIntoRegion(regionHandle, primID, position, isPhysical);
handlerPrimCrossingIntoRegion(primID, position, isPhysical);
}
}
protected bool CloseConnection(ulong regionHandle, UUID agentID)
protected bool CloseConnection(UUID agentID)
{
m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString());
m_log.Debug("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID);
handlerCloseAgentConnection = OnCloseAgentConnection;
if (handlerCloseAgentConnection != null)
{
return handlerCloseAgentConnection(regionHandle, agentID);
return handlerCloseAgentConnection(agentID);
}
return false;
}
@ -416,8 +418,6 @@ namespace OpenSim.Region.Environment.Scenes
// yes, we're notifying ourselves.
if (handlerRegionUp != null)
handlerRegionUp(region);
}
else
{
@ -726,7 +726,7 @@ namespace OpenSim.Region.Environment.Scenes
{
SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList());
SendCloseChildAgentConnections(avatar.UUID, childRegions);
CloseConnection(m_regionInfo.RegionHandle, avatar.UUID);
CloseConnection(avatar.UUID);
}
// if (teleport success) // seems to be always success here
// the user may change their profile information in other region,
@ -763,7 +763,7 @@ namespace OpenSim.Region.Environment.Scenes
}
/// <summary>
///
/// Inform a neighbouring region that an avatar is about to cross into it.
/// </summary>
/// <param name="regionhandle"></param>
/// <param name="agentID"></param>
@ -778,7 +778,6 @@ namespace OpenSim.Region.Environment.Scenes
return m_commsProvider.InterRegion.InformRegionOfPrimCrossing(regionhandle, primID, objData, XMLMethod);
}
public Dictionary<string, string> GetGridSettings()
{
return m_commsProvider.GridService.GetGridSettings();