aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2013-07-28 19:31:17 -0700
committerDiva Canto2013-07-28 19:31:17 -0700
commit1b94de8e58434cc882e1dde83919ecd3f1425e3f (patch)
tree3688e4b8d3d5b366a097fc104e6c110088df4217 /OpenSim
parentGroup chat: guard against duplicate sends (diff)
downloadopensim-SC_OLD-1b94de8e58434cc882e1dde83919ecd3f1425e3f.zip
opensim-SC_OLD-1b94de8e58434cc882e1dde83919ecd3f1425e3f.tar.gz
opensim-SC_OLD-1b94de8e58434cc882e1dde83919ecd3f1425e3f.tar.bz2
opensim-SC_OLD-1b94de8e58434cc882e1dde83919ecd3f1425e3f.tar.xz
Group chat: prevent a situation where dupe IMs could occur.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Addons/Groups/GroupsMessagingModule.cs12
1 files changed, 3 insertions, 9 deletions
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
405 GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID); 405 GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID);
406 406
407 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), GroupID); 407 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), GroupID);
408 List<UUID> alreadySeen = new List<UUID>();
409 408
410 //if (m_debugEnabled) 409 //if (m_debugEnabled)
411 // foreach (GroupMembersData m in groupMembers) 410 // foreach (GroupMembersData m in groupMembers)
@@ -415,15 +414,10 @@ namespace OpenSim.Groups
415 { 414 {
416 s.ForEachScenePresence(sp => 415 s.ForEachScenePresence(sp =>
417 { 416 {
418 // We need this, because we are searching through all 417 // If we got this via grid messaging, it's because the caller thinks
419 // SPs, both root and children 418 // that the root agent is here. We should only send the IM to root agents.
420 if (alreadySeen.Contains(sp.UUID)) 419 if (sp.IsChildAgent)
421 {
422 if (m_debugEnabled)
423 m_log.DebugFormat("[Groups.Messaging]: skipping agent {0} because we've already seen it", sp.UUID);
424 return; 420 return;
425 }
426 alreadySeen.Add(sp.UUID);
427 421
428 GroupMembersData m = groupMembers.Find(gmd => 422 GroupMembersData m = groupMembers.Find(gmd =>
429 { 423 {