aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups
diff options
context:
space:
mode:
authorDiva Canto2016-06-19 17:35:11 -0700
committerDiva Canto2016-06-19 17:35:11 -0700
commit8d99fe095a231ba71ce71712cb87f8114672e7df (patch)
treebc047d6a080323ae7f9344d98fc27e5a8fb99a9b /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups
parentAgentGroupData was being sent by both UDP and EQ -- an overkill. Turn off UDP... (diff)
downloadopensim-SC_OLD-8d99fe095a231ba71ce71712cb87f8114672e7df.zip
opensim-SC_OLD-8d99fe095a231ba71ce71712cb87f8114672e7df.tar.gz
opensim-SC_OLD-8d99fe095a231ba71ce71712cb87f8114672e7df.tar.bz2
opensim-SC_OLD-8d99fe095a231ba71ce71712cb87f8114672e7df.tar.xz
Mantis #7920: group info was not being updated in many situations. (regression) Putting back the heavy messaging.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs46
1 files changed, 34 insertions, 12 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 5dfbe2c..ef14270 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -442,12 +442,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
442 442
443 OutgoingInstantMessage(msg, inviteInfo.AgentID); 443 OutgoingInstantMessage(msg, inviteInfo.AgentID);
444 444
445 IClientAPI client = GetActiveClient(inviteInfo.AgentID); 445 UpdateAllClientsWithGroupInfo(inviteInfo.AgentID);
446 if (client != null)
447 SendDataUpdate(remoteClient, true);
448
449 // TODO: If the inviter is still online, they need an agent dataupdate
450 // and maybe group membership updates for the invitee
451 446
452 m_groupData.RemoveAgentToGroupInvite(GetRequestingAgentID(remoteClient), inviteID); 447 m_groupData.RemoveAgentToGroupInvite(GetRequestingAgentID(remoteClient), inviteID);
453 } 448 }
@@ -1207,8 +1202,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1207 // SL sends out messages to everyone in the group 1202 // SL sends out messages to everyone in the group
1208 // Who all should receive updates and what should they be updated with? 1203 // Who all should receive updates and what should they be updated with?
1209 // just tell this the group change 1204 // just tell this the group change
1210 SendAgentGroupDataUpdate(remoteClient, false); 1205 UpdateAllClientsWithGroupInfo(ejecteeID);
1211 // TODO fix the rest of sends
1212 } 1206 }
1213 1207
1214 public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID) 1208 public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID)
@@ -1353,16 +1347,44 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1353 } 1347 }
1354 } 1348 }
1355 1349
1350 /// <summary>
1351 /// Send updates to all clients who might be interested in groups data for dataForClientID
1352 /// </summary>
1353 private void UpdateAllClientsWithGroupInfo(UUID dataForClientID)
1354 {
1355 if (m_debugEnabled) m_log.InfoFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1356
1357 // TODO: Probably isn't nessesary to update every client in every scene.
1358 // Need to examine client updates and do only what's nessesary.
1359 lock (m_sceneList)
1360 {
1361 foreach (Scene scene in m_sceneList)
1362 {
1363 scene.ForEachClient(delegate (IClientAPI client) { SendAgentGroupDataUpdate(client, dataForClientID); });
1364 }
1365 }
1366 }
1367
1356 public void SendAgentGroupDataUpdate(IClientAPI remoteClient) 1368 public void SendAgentGroupDataUpdate(IClientAPI remoteClient)
1357 { 1369 {
1358 SendAgentGroupDataUpdate(remoteClient, true); 1370 SendAgentGroupDataUpdate(remoteClient, true);
1359 } 1371 }
1360 1372
1361 /// <summary> 1373 public void SendAgentGroupDataUpdate(IClientAPI remoteClient, UUID dataForClientID)
1362 /// Tell remoteClient about its agent groups, and optionally send title to others 1374 {
1363 /// </summary> 1375 SendAgentGroupDataUpdate(remoteClient, dataForClientID, true);
1376 }
1377
1364 private void SendAgentGroupDataUpdate(IClientAPI remoteClient, bool tellOthers) 1378 private void SendAgentGroupDataUpdate(IClientAPI remoteClient, bool tellOthers)
1365 { 1379 {
1380 SendAgentGroupDataUpdate(remoteClient, GetRequestingAgentID(remoteClient), tellOthers);
1381 }
1382
1383 /// <summary>
1384 /// Tell remoteClient about its agent groups, and optionally send title to others
1385 /// </summary>
1386 private void SendAgentGroupDataUpdate(IClientAPI remoteClient, UUID dataForClientID, bool tellOthers)
1387 {
1366 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called for {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name); 1388 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called for {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name);
1367 1389
1368 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff 1390 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
@@ -1373,7 +1395,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1373 1395
1374 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); 1396 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
1375 IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); 1397 IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
1376 eq.GroupMembershipData(GetRequestingAgentID(remoteClient), membershipArray); 1398 eq.GroupMembershipData(GetRequestingAgentID(remoteClient), dataForClientID, membershipArray);
1377 1399
1378 remoteClient.RefreshGroupMembership(); 1400 remoteClient.RefreshGroupMembership();
1379 } 1401 }