From a3c5f76942270f17e359bfcf8f43c6db3d1f782d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 15 Nov 2011 18:16:43 +0000
Subject: Removed unused and mostly commented out SceneCommunicationService
methods
As far as I can see, the SCS is only now used for informing neighbours of up/down status and possibly sending child agent updates and close requests
---
OpenSim/Region/Framework/Scenes/Scene.cs | 38 +---------
.../Framework/Scenes/SceneCommunicationService.cs | 81 +---------------------
2 files changed, 3 insertions(+), 116 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 781f922..fb4b545 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1121,8 +1121,8 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGraph.Close();
- // De-register with region communications (events cleanup)
- UnRegisterRegionWithComms();
+ if (!GridService.DeregisterRegion(m_regInfo.RegionID))
+ m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
// call the base class Close method.
base.Close();
@@ -1623,8 +1623,6 @@ namespace OpenSim.Region.Framework.Scenes
/// Thrown if registration of the region itself fails.
public void RegisterRegionWithGrid()
{
- RegisterCommsEvents();
-
m_sceneGridService.SetScene(this);
GridRegion region = new GridRegion(RegionInfo);
@@ -3196,38 +3194,6 @@ namespace OpenSim.Region.Framework.Scenes
#region RegionComms
///
- /// Register the methods that should be invoked when this scene receives various incoming events
- ///
- public void RegisterCommsEvents()
- {
- m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent;
- //m_eventManager.OnRegionUp += OtherRegionUp;
- //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
- //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar;
- m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
- m_sceneGridService.OnGetLandData += GetLandData;
- }
-
- ///
- /// Deregister this scene from receiving incoming region events
- ///
- public void UnRegisterRegionWithComms()
- {
- m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid;
- //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
- //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
- //m_eventManager.OnRegionUp -= OtherRegionUp;
- m_sceneGridService.OnCloseAgentConnection -= IncomingCloseAgent;
- m_sceneGridService.OnGetLandData -= GetLandData;
-
- // this does nothing; should be removed
- m_sceneGridService.Close();
-
- if (!GridService.DeregisterRegion(m_regInfo.RegionID))
- m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
- }
-
- ///
/// Do the work necessary to initiate a new user connection for a particular scene.
/// At the moment, this consists of setting up the caps infrastructure
/// The return bool should allow for connections to be refused, but as not all calling paths
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 3d56f9b..0e22156 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -55,57 +55,6 @@ namespace OpenSim.Region.Framework.Scenes
protected RegionInfo m_regionInfo;
protected Scene m_scene;
- protected List m_agentsInTransit;
-
- ///
- /// A user will arrive shortly, set up appropriate credentials so it can connect
- ///
-// public event ExpectUserDelegate OnExpectUser;
-
- ///
- /// A Prim will arrive shortly
- ///
- public event CloseAgentConnection OnCloseAgentConnection;
-
- ///
- /// A new prim has arrived
- ///
-// public event PrimCrossing OnPrimCrossingIntoRegion;
-
- /////
- ///// A New Region is up and available
- /////
- //public event RegionUp OnRegionUp;
-
- ///
- /// We have a child agent for this avatar and we're getting a status update about it
- ///
-// public event ChildAgentUpdate OnChildAgentUpdate;
- //public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar;
-
- ///
- /// Time to log one of our users off. Grid Service sends this mostly
- ///
- public event LogOffUser OnLogOffUser;
-
- ///
- /// A region wants land data from us!
- ///
- public event GetLandData OnGetLandData;
-
-// private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion;
-// private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser;
-// private CloseAgentConnection handlerCloseAgentConnection = null; // OnCloseAgentConnection;
-// private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion;
- //private RegionUp handlerRegionUp = null; // OnRegionUp;
-// private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate;
- //private RemoveKnownRegionsFromAvatarList handlerRemoveKnownRegionFromAvatar = null; // OnRemoveKnownRegionFromAvatar;
-// private LogOffUser handlerLogOffUser = null;
-// private GetLandData handlerGetLandData = null; // OnGetLandData
-
- public SceneCommunicationService()
- {
- }
public void SetScene(Scene s)
{
@@ -113,23 +62,6 @@ namespace OpenSim.Region.Framework.Scenes
m_regionInfo = s.RegionInfo;
}
- ///
- /// Register a region with the grid
- ///
- ///
- /// Thrown if region registration fails.
- public void RegisterRegion(IInterregionCommsOut comms_out, RegionInfo regionInfos)
- {
- }
-
- ///
- /// This region is shutting down, de-register all events!
- /// De-Register region from Grid!
- ///
- public void Close()
- {
- }
-
public delegate void InformNeighbourThatRegionUpDelegate(INeighbourService nService, RegionInfo region, ulong regionhandle);
private void InformNeighborsThatRegionisUpCompleted(IAsyncResult iar)
@@ -165,7 +97,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
-
public void InformNeighborsThatRegionisUp(INeighbourService neighbourService, RegionInfo region)
{
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
@@ -182,7 +113,6 @@ namespace OpenSim.Region.Framework.Scenes
}
public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest);
-
///
/// This informs all neighboring regions about the settings of it's child agent.
@@ -247,19 +177,11 @@ namespace OpenSim.Region.Framework.Scenes
}
- //public delegate void SendCloseChildAgentDelegate(UUID agentID, ulong regionHandle);
- //private void SendCloseChildAgentCompleted(IAsyncResult iar)
- //{
- // SendCloseChildAgentDelegate icon = (SendCloseChildAgentDelegate)iar.AsyncState;
- // icon.EndInvoke(iar);
- //}
-
///
/// Closes a child agent on a given region
///
protected void SendCloseChildAgent(UUID agentID, ulong regionHandle)
{
-
m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle);
// let's do our best, but there's not much we can do if the neighbour doesn't accept.
@@ -291,6 +213,5 @@ namespace OpenSim.Region.Framework.Scenes
{
return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber);
}
-
}
-}
+}
\ No newline at end of file
--
cgit v1.1