aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons
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/Addons
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/Addons')
-rw-r--r--OpenSim/Addons/Groups/GroupsModule.cs47
1 files changed, 37 insertions, 10 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs
index f24670a..d27797e 100644
--- a/OpenSim/Addons/Groups/GroupsModule.cs
+++ b/OpenSim/Addons/Groups/GroupsModule.cs
@@ -394,9 +394,8 @@ namespace OpenSim.Groups
394 394
395 OutgoingInstantMessage(msg, invitee); 395 OutgoingInstantMessage(msg, invitee);
396 396
397 IClientAPI client = GetActiveClient(invitee); 397 UpdateAllClientsWithGroupInfo(invitee);
398 if (client != null) 398
399 SendDataUpdate(remoteClient, true);
400 } 399 }
401 400
402 m_groupData.RemoveAgentToGroupInvite(GetRequestingAgentIDStr(remoteClient), inviteID); 401 m_groupData.RemoveAgentToGroupInvite(GetRequestingAgentIDStr(remoteClient), inviteID);
@@ -1112,7 +1111,7 @@ namespace OpenSim.Groups
1112 1111
1113 // SL sends out messages to everyone in the group 1112 // SL sends out messages to everyone in the group
1114 // Who all should receive updates and what should they be updated with? 1113 // Who all should receive updates and what should they be updated with?
1115 SendAgentGroupDataUpdate(remoteClient, false); 1114 UpdateAllClientsWithGroupInfo(ejecteeID);
1116 } 1115 }
1117 1116
1118 public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID) 1117 public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID)
@@ -1226,16 +1225,44 @@ namespace OpenSim.Groups
1226 } 1225 }
1227 } 1226 }
1228 1227
1228 /// <summary>
1229 /// Send updates to all clients who might be interested in groups data for dataForClientID
1230 /// </summary>
1231 private void UpdateAllClientsWithGroupInfo(UUID dataForClientID)
1232 {
1233 if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
1234
1235 // TODO: Probably isn't nessesary to update every client in every scene.
1236 // Need to examine client updates and do only what's nessesary.
1237 lock (m_sceneList)
1238 {
1239 foreach (Scene scene in m_sceneList)
1240 {
1241 scene.ForEachClient(delegate (IClientAPI client) { SendAgentGroupDataUpdate(client, dataForClientID); });
1242 }
1243 }
1244 }
1245
1229 public void SendAgentGroupDataUpdate(IClientAPI remoteClient) 1246 public void SendAgentGroupDataUpdate(IClientAPI remoteClient)
1230 { 1247 {
1231 SendAgentGroupDataUpdate(remoteClient, true); 1248 SendAgentGroupDataUpdate(remoteClient, GetRequestingAgentID(remoteClient), true);
1249 }
1250
1251 public void SendAgentGroupDataUpdate(IClientAPI remoteClient, UUID dataForClientID)
1252 {
1253 SendAgentGroupDataUpdate(remoteClient, dataForClientID, true);
1232 } 1254 }
1233 1255
1234 /// <summary>
1235 /// Tell remoteClient about its agent groups, and optionally send title to others
1236 /// </summary>
1237 private void SendAgentGroupDataUpdate(IClientAPI remoteClient, bool tellOthers) 1256 private void SendAgentGroupDataUpdate(IClientAPI remoteClient, bool tellOthers)
1238 { 1257 {
1258 SendAgentGroupDataUpdate(remoteClient, GetRequestingAgentID(remoteClient), tellOthers);
1259 }
1260
1261 /// <summary>
1262 /// Tell remoteClient about its agent groups, and optionally send title to others
1263 /// </summary>
1264 private void SendAgentGroupDataUpdate(IClientAPI remoteClient, UUID dataForClientID, bool tellOthers)
1265 {
1239 if (m_debugEnabled) m_log.InfoFormat("[Groups]: {0} called for {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name); 1266 if (m_debugEnabled) m_log.InfoFormat("[Groups]: {0} called for {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name);
1240 1267
1241 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff 1268 // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
@@ -1246,7 +1273,7 @@ namespace OpenSim.Groups
1246 1273
1247 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); 1274 GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
1248 IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); 1275 IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
1249 eq.GroupMembershipData(GetRequestingAgentID(remoteClient), membershipArray); 1276 eq.GroupMembershipData(GetRequestingAgentID(remoteClient), dataForClientID, membershipArray);
1250 1277
1251 remoteClient.RefreshGroupMembership(); 1278 remoteClient.RefreshGroupMembership();
1252 } 1279 }