diff options
author | Diva Canto | 2016-06-19 17:35:11 -0700 |
---|---|---|
committer | Diva Canto | 2016-06-19 17:35:11 -0700 |
commit | 8d99fe095a231ba71ce71712cb87f8114672e7df (patch) | |
tree | bc047d6a080323ae7f9344d98fc27e5a8fb99a9b /OpenSim/Region | |
parent | AgentGroupData was being sent by both UDP and EQ -- an overkill. Turn off UDP... (diff) | |
download | opensim-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')
4 files changed, 47 insertions, 25 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 9a1cef4..d628cfc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -585,9 +585,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
585 | Enqueue(item, avatarID); | 585 | Enqueue(item, avatarID); |
586 | } | 586 | } |
587 | 587 | ||
588 | public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data) | 588 | public void GroupMembershipData(UUID receiverAgent, UUID dataForClientID, GroupMembershipData[] data) |
589 | { | 589 | { |
590 | OSD item = EventQueueHelper.GroupMembershipData(receiverAgent, data); | 590 | OSD item = EventQueueHelper.GroupMembershipData(receiverAgent, dataForClientID, data); |
591 | Enqueue(item, receiverAgent); | 591 | Enqueue(item, receiverAgent); |
592 | } | 592 | } |
593 | 593 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index 2344fc6..7c8f441 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | |||
@@ -367,7 +367,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
367 | return groupUpdate; | 367 | return groupUpdate; |
368 | } | 368 | } |
369 | 369 | ||
370 | public static OSD GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data) | 370 | public static OSD GroupMembershipData(UUID receiverAgent, UUID dataForAgentID, GroupMembershipData[] data) |
371 | { | 371 | { |
372 | OSDArray AgentData = new OSDArray(1); | 372 | OSDArray AgentData = new OSDArray(1); |
373 | OSDMap AgentDataMap = new OSDMap(1); | 373 | OSDMap AgentDataMap = new OSDMap(1); |
@@ -379,15 +379,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
379 | 379 | ||
380 | foreach (GroupMembershipData membership in data) | 380 | foreach (GroupMembershipData membership in data) |
381 | { | 381 | { |
382 | //if (receiverAgent != dataForAgentID) | 382 | if (receiverAgent != dataForAgentID) |
383 | //{ | 383 | { |
384 | // if (!membership.ListInProfile) | 384 | if (!membership.ListInProfile) |
385 | // { | 385 | { |
386 | // // If we're sending group info to remoteclient about another agent, | 386 | // If we're sending group info to remoteclient about another agent, |
387 | // // filter out groups the other agent doesn't want to share. | 387 | // filter out groups the other agent doesn't want to share. |
388 | // continue; | 388 | continue; |
389 | // } | 389 | } |
390 | //} | 390 | } |
391 | 391 | ||
392 | OSDMap GroupDataMap = new OSDMap(6); | 392 | OSDMap GroupDataMap = new OSDMap(6); |
393 | OSDMap NewGroupDataMap = new OSDMap(1); | 393 | OSDMap NewGroupDataMap = new OSDMap(1); |
diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs index f4014db..1f29f7b 100644 --- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs +++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
59 | bool isModerator, bool textMute); | 59 | bool isModerator, bool textMute); |
60 | void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID); | 60 | void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID); |
61 | void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); | 61 | void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); |
62 | void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data); | 62 | void GroupMembershipData(UUID receiverAgent, UUID dataForClientID, GroupMembershipData[] data); |
63 | OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); | 63 | OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); |
64 | OSD BuildEvent(string eventName, OSD eventBody); | 64 | OSD BuildEvent(string eventName, OSD eventBody); |
65 | void partPhysicsProperties(uint localID, byte physhapetype, float density, float friction, float bounce, float gravmod, UUID avatarID); | 65 | void partPhysicsProperties(uint localID, byte physhapetype, float density, float friction, float bounce, float gravmod, UUID avatarID); |
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 | } |