aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2015-09-28 21:03:20 +0100
committerUbitUmarov2015-09-28 21:03:20 +0100
commita580d945d14131a56b9547a8e8cf198d37ba56cd (patch)
treebfb247aca8db0f76d2576fa09120d42310845928
parent remove groups handlers onClientClosed (diff)
downloadopensim-SC-a580d945d14131a56b9547a8e8cf198d37ba56cd.zip
opensim-SC-a580d945d14131a56b9547a8e8cf198d37ba56cd.tar.gz
opensim-SC-a580d945d14131a56b9547a8e8cf198d37ba56cd.tar.bz2
opensim-SC-a580d945d14131a56b9547a8e8cf198d37ba56cd.tar.xz
remove groups handlers onClientClose also on groups V2
Diffstat (limited to '')
-rw-r--r--OpenSim/Addons/Groups/GroupsModule.cs30
1 files changed, 18 insertions, 12 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs
index 7b337cf..da8c9ea 100644
--- a/OpenSim/Addons/Groups/GroupsModule.cs
+++ b/OpenSim/Addons/Groups/GroupsModule.cs
@@ -268,18 +268,24 @@ namespace OpenSim.Groups
268 remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups); 268 remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups);
269 } 269 }
270 270
271 /* 271 private void OnClientClosed(UUID AgentId, Scene scene)
272 * This becomes very problematic in a shared module. In a shared module you may have more then one
273 * reference to IClientAPI's, one for 0 or 1 root connections, and 0 or more child connections.
274 * The OnClientClosed event does not provide anything to indicate which one of those should be closed
275 * nor does it provide what scene it was from so that the specific reference can be looked up.
276 * The InstantMessageModule.cs does not currently worry about unregistering the handles,
277 * and it should be an issue, since it's the client that references us not the other way around
278 * , so as long as we don't keep a reference to the client laying around, the client can still be GC'ed
279 private void OnClientClosed(UUID AgentId)
280 { 272 {
281 if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 273 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
274 if (scene == null)
275 return;
282 276
277 ScenePresence sp = scene.GetScenePresence(AgentId);
278 IClientAPI client = sp.ControllingClient;
279 if (client != null)
280 {
281 client.OnAgentDataUpdateRequest -= OnAgentDataUpdateRequest;
282 client.OnRequestAvatarProperties -= OnRequestAvatarProperties;
283 // make child possible not called?
284 client.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest;
285 client.OnInstantMessage -= OnInstantMessage;
286 }
287
288 /*
283 lock (m_ActiveClients) 289 lock (m_ActiveClients)
284 { 290 {
285 if (m_ActiveClients.ContainsKey(AgentId)) 291 if (m_ActiveClients.ContainsKey(AgentId))
@@ -297,11 +303,11 @@ namespace OpenSim.Groups
297 if (m_debugEnabled) m_log.WarnFormat("[Groups]: Client closed that wasn't registered here."); 303 if (m_debugEnabled) m_log.WarnFormat("[Groups]: Client closed that wasn't registered here.");
298 } 304 }
299 305
300
301 }
302 } 306 }
303 */ 307 */
304 308
309 }
310
305 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID) 311 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID)
306 { 312 {
307 // this a private message for own agent only 313 // this a private message for own agent only