aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-15 18:16:43 +0000
committerJustin Clark-Casey (justincc)2011-11-15 18:16:43 +0000
commita3c5f76942270f17e359bfcf8f43c6db3d1f782d (patch)
tree65a49534eaa9a5f9aa83754b55d5f9532ee7dea9 /OpenSim/Region/Framework
parentRemove prebuild reference to now gone PumaCode.SvnDotNet.dll (diff)
downloadopensim-SC_OLD-a3c5f76942270f17e359bfcf8f43c6db3d1f782d.zip
opensim-SC_OLD-a3c5f76942270f17e359bfcf8f43c6db3d1f782d.tar.gz
opensim-SC_OLD-a3c5f76942270f17e359bfcf8f43c6db3d1f782d.tar.bz2
opensim-SC_OLD-a3c5f76942270f17e359bfcf8f43c6db3d1f782d.tar.xz
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
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs81
2 files changed, 3 insertions, 116 deletions
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
1121 1121
1122 m_sceneGraph.Close(); 1122 m_sceneGraph.Close();
1123 1123
1124 // De-register with region communications (events cleanup) 1124 if (!GridService.DeregisterRegion(m_regInfo.RegionID))
1125 UnRegisterRegionWithComms(); 1125 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
1126 1126
1127 // call the base class Close method. 1127 // call the base class Close method.
1128 base.Close(); 1128 base.Close();
@@ -1623,8 +1623,6 @@ namespace OpenSim.Region.Framework.Scenes
1623 /// <exception cref="System.Exception">Thrown if registration of the region itself fails.</exception> 1623 /// <exception cref="System.Exception">Thrown if registration of the region itself fails.</exception>
1624 public void RegisterRegionWithGrid() 1624 public void RegisterRegionWithGrid()
1625 { 1625 {
1626 RegisterCommsEvents();
1627
1628 m_sceneGridService.SetScene(this); 1626 m_sceneGridService.SetScene(this);
1629 1627
1630 GridRegion region = new GridRegion(RegionInfo); 1628 GridRegion region = new GridRegion(RegionInfo);
@@ -3196,38 +3194,6 @@ namespace OpenSim.Region.Framework.Scenes
3196 #region RegionComms 3194 #region RegionComms
3197 3195
3198 /// <summary> 3196 /// <summary>
3199 /// Register the methods that should be invoked when this scene receives various incoming events
3200 /// </summary>
3201 public void RegisterCommsEvents()
3202 {
3203 m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent;
3204 //m_eventManager.OnRegionUp += OtherRegionUp;
3205 //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
3206 //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar;
3207 m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
3208 m_sceneGridService.OnGetLandData += GetLandData;
3209 }
3210
3211 /// <summary>
3212 /// Deregister this scene from receiving incoming region events
3213 /// </summary>
3214 public void UnRegisterRegionWithComms()
3215 {
3216 m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid;
3217 //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
3218 //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
3219 //m_eventManager.OnRegionUp -= OtherRegionUp;
3220 m_sceneGridService.OnCloseAgentConnection -= IncomingCloseAgent;
3221 m_sceneGridService.OnGetLandData -= GetLandData;
3222
3223 // this does nothing; should be removed
3224 m_sceneGridService.Close();
3225
3226 if (!GridService.DeregisterRegion(m_regInfo.RegionID))
3227 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
3228 }
3229
3230 /// <summary>
3231 /// Do the work necessary to initiate a new user connection for a particular scene. 3197 /// Do the work necessary to initiate a new user connection for a particular scene.
3232 /// At the moment, this consists of setting up the caps infrastructure 3198 /// At the moment, this consists of setting up the caps infrastructure
3233 /// The return bool should allow for connections to be refused, but as not all calling paths 3199 /// 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
55 55
56 protected RegionInfo m_regionInfo; 56 protected RegionInfo m_regionInfo;
57 protected Scene m_scene; 57 protected Scene m_scene;
58 protected List<UUID> m_agentsInTransit;
59
60 /// <summary>
61 /// A user will arrive shortly, set up appropriate credentials so it can connect
62 /// </summary>
63// public event ExpectUserDelegate OnExpectUser;
64
65 /// <summary>
66 /// A Prim will arrive shortly
67 /// </summary>
68 public event CloseAgentConnection OnCloseAgentConnection;
69
70 /// <summary>
71 /// A new prim has arrived
72 /// </summary>
73// public event PrimCrossing OnPrimCrossingIntoRegion;
74
75 ///// <summary>
76 ///// A New Region is up and available
77 ///// </summary>
78 //public event RegionUp OnRegionUp;
79
80 /// <summary>
81 /// We have a child agent for this avatar and we're getting a status update about it
82 /// </summary>
83// public event ChildAgentUpdate OnChildAgentUpdate;
84 //public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar;
85
86 /// <summary>
87 /// Time to log one of our users off. Grid Service sends this mostly
88 /// </summary>
89 public event LogOffUser OnLogOffUser;
90
91 /// <summary>
92 /// A region wants land data from us!
93 /// </summary>
94 public event GetLandData OnGetLandData;
95
96// private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion;
97// private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser;
98// private CloseAgentConnection handlerCloseAgentConnection = null; // OnCloseAgentConnection;
99// private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion;
100 //private RegionUp handlerRegionUp = null; // OnRegionUp;
101// private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate;
102 //private RemoveKnownRegionsFromAvatarList handlerRemoveKnownRegionFromAvatar = null; // OnRemoveKnownRegionFromAvatar;
103// private LogOffUser handlerLogOffUser = null;
104// private GetLandData handlerGetLandData = null; // OnGetLandData
105
106 public SceneCommunicationService()
107 {
108 }
109 58
110 public void SetScene(Scene s) 59 public void SetScene(Scene s)
111 { 60 {
@@ -113,23 +62,6 @@ namespace OpenSim.Region.Framework.Scenes
113 m_regionInfo = s.RegionInfo; 62 m_regionInfo = s.RegionInfo;
114 } 63 }
115 64
116 /// <summary>
117 /// Register a region with the grid
118 /// </summary>
119 /// <param name="regionInfos"></param>
120 /// <exception cref="System.Exception">Thrown if region registration fails.</exception>
121 public void RegisterRegion(IInterregionCommsOut comms_out, RegionInfo regionInfos)
122 {
123 }
124
125 /// <summary>
126 /// This region is shutting down, de-register all events!
127 /// De-Register region from Grid!
128 /// </summary>
129 public void Close()
130 {
131 }
132
133 public delegate void InformNeighbourThatRegionUpDelegate(INeighbourService nService, RegionInfo region, ulong regionhandle); 65 public delegate void InformNeighbourThatRegionUpDelegate(INeighbourService nService, RegionInfo region, ulong regionhandle);
134 66
135 private void InformNeighborsThatRegionisUpCompleted(IAsyncResult iar) 67 private void InformNeighborsThatRegionisUpCompleted(IAsyncResult iar)
@@ -165,7 +97,6 @@ namespace OpenSim.Region.Framework.Scenes
165 } 97 }
166 } 98 }
167 99
168
169 public void InformNeighborsThatRegionisUp(INeighbourService neighbourService, RegionInfo region) 100 public void InformNeighborsThatRegionisUp(INeighbourService neighbourService, RegionInfo region)
170 { 101 {
171 //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); 102 //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
@@ -182,7 +113,6 @@ namespace OpenSim.Region.Framework.Scenes
182 } 113 }
183 114
184 public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest); 115 public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest);
185
186 116
187 /// <summary> 117 /// <summary>
188 /// This informs all neighboring regions about the settings of it's child agent. 118 /// This informs all neighboring regions about the settings of it's child agent.
@@ -247,19 +177,11 @@ namespace OpenSim.Region.Framework.Scenes
247 177
248 } 178 }
249 179
250 //public delegate void SendCloseChildAgentDelegate(UUID agentID, ulong regionHandle);
251 //private void SendCloseChildAgentCompleted(IAsyncResult iar)
252 //{
253 // SendCloseChildAgentDelegate icon = (SendCloseChildAgentDelegate)iar.AsyncState;
254 // icon.EndInvoke(iar);
255 //}
256
257 /// <summary> 180 /// <summary>
258 /// Closes a child agent on a given region 181 /// Closes a child agent on a given region
259 /// </summary> 182 /// </summary>
260 protected void SendCloseChildAgent(UUID agentID, ulong regionHandle) 183 protected void SendCloseChildAgent(UUID agentID, ulong regionHandle)
261 { 184 {
262
263 m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle); 185 m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle);
264 // let's do our best, but there's not much we can do if the neighbour doesn't accept. 186 // let's do our best, but there's not much we can do if the neighbour doesn't accept.
265 187
@@ -291,6 +213,5 @@ namespace OpenSim.Region.Framework.Scenes
291 { 213 {
292 return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber); 214 return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber);
293 } 215 }
294
295 } 216 }
296} 217} \ No newline at end of file