From 1b94de8e58434cc882e1dde83919ecd3f1425e3f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 28 Jul 2013 19:31:17 -0700 Subject: Group chat: prevent a situation where dupe IMs could occur. --- OpenSim/Addons/Groups/GroupsMessagingModule.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs index 83d296e..be59c62 100644 --- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs +++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs @@ -405,7 +405,6 @@ namespace OpenSim.Groups GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID); List groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), GroupID); - List alreadySeen = new List(); //if (m_debugEnabled) // foreach (GroupMembersData m in groupMembers) @@ -415,15 +414,10 @@ namespace OpenSim.Groups { s.ForEachScenePresence(sp => { - // We need this, because we are searching through all - // SPs, both root and children - if (alreadySeen.Contains(sp.UUID)) - { - if (m_debugEnabled) - m_log.DebugFormat("[Groups.Messaging]: skipping agent {0} because we've already seen it", sp.UUID); + // If we got this via grid messaging, it's because the caller thinks + // that the root agent is here. We should only send the IM to root agents. + if (sp.IsChildAgent) return; - } - alreadySeen.Add(sp.UUID); GroupMembersData m = groupMembers.Find(gmd => { -- cgit v1.1