diff options
author | UbitUmarov | 2016-07-01 17:31:31 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-01 17:31:31 +0100 |
commit | 1777324a862a41c57d12bd6180129a30d9653841 (patch) | |
tree | 987b7adaa8d636c1e576a1caa1fe7f9860ac6018 | |
parent | increase xmlrpc timeout in xmlrpcgroups, disable its cache until its entries ... (diff) | |
download | opensim-SC_OLD-1777324a862a41c57d12bd6180129a30d9653841.zip opensim-SC_OLD-1777324a862a41c57d12bd6180129a30d9653841.tar.gz opensim-SC_OLD-1777324a862a41c57d12bd6180129a30d9653841.tar.bz2 opensim-SC_OLD-1777324a862a41c57d12bd6180129a30d9653841.tar.xz |
cleanup a bit AgentGroupDataUpdate sending
-rw-r--r-- | OpenSim/Addons/Groups/GroupsModule.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 67 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 5 |
3 files changed, 34 insertions, 44 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 13b7123..11a2a12 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -1277,13 +1277,9 @@ namespace OpenSim.Groups | |||
1277 | SendDataUpdate(remoteClient, tellOthers); | 1277 | SendDataUpdate(remoteClient, tellOthers); |
1278 | 1278 | ||
1279 | GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); | 1279 | GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); |
1280 | IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); | ||
1281 | if (eq != null) | ||
1282 | eq.GroupMembershipData(agentID, membershipArray); | ||
1283 | else | ||
1284 | remoteClient.SendGroupMembership(membershipArray); | ||
1285 | 1280 | ||
1286 | remoteClient.RefreshGroupMembership(); | 1281 | remoteClient.RefreshGroupMembership(); |
1282 | remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray); | ||
1287 | } | 1283 | } |
1288 | 1284 | ||
1289 | /// <summary> | 1285 | /// <summary> |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index cc2d1e2..12f6fbd 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -2777,11 +2777,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2777 | Groupupdate.GroupData = Groups; | 2777 | Groupupdate.GroupData = Groups; |
2778 | Groupupdate.AgentData = new AgentGroupDataUpdatePacket.AgentDataBlock(); | 2778 | Groupupdate.AgentData = new AgentGroupDataUpdatePacket.AgentDataBlock(); |
2779 | Groupupdate.AgentData.AgentID = AgentId; | 2779 | Groupupdate.AgentData.AgentID = AgentId; |
2780 | //OutPacket(Groupupdate, ThrottleOutPacketType.Task); | ||
2781 | 2780 | ||
2781 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | ||
2782 | try | 2782 | try |
2783 | { | 2783 | { |
2784 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | ||
2785 | if (eq != null) | 2784 | if (eq != null) |
2786 | { | 2785 | { |
2787 | eq.GroupMembership(Groupupdate, this.AgentId); | 2786 | eq.GroupMembership(Groupupdate, this.AgentId); |
@@ -2791,8 +2790,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2791 | { | 2790 | { |
2792 | m_log.Error("Unable to send group membership data via eventqueue - exception: " + ex.ToString()); | 2791 | m_log.Error("Unable to send group membership data via eventqueue - exception: " + ex.ToString()); |
2793 | m_log.Warn("sending group membership data via UDP"); | 2792 | m_log.Warn("sending group membership data via UDP"); |
2794 | OutPacket(Groupupdate, ThrottleOutPacketType.Task); | 2793 | eq = null; |
2795 | } | 2794 | } |
2795 | |||
2796 | if(eq == null) // udp if no eq | ||
2797 | OutPacket(Groupupdate, ThrottleOutPacketType.Task); | ||
2798 | |||
2796 | } | 2799 | } |
2797 | 2800 | ||
2798 | public void SendPartPhysicsProprieties(ISceneEntity entity) | 2801 | public void SendPartPhysicsProprieties(ISceneEntity entity) |
@@ -3423,41 +3426,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3423 | 3426 | ||
3424 | public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data) | 3427 | public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data) |
3425 | { | 3428 | { |
3429 | if(avatarID != AgentId) | ||
3430 | m_log.Debug("[CLIENT]: SendAgentGroupDataUpdate avatarID != AgentId"); | ||
3431 | |||
3426 | IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>(); | 3432 | IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>(); |
3427 | 3433 | if(eq != null) | |
3428 | // use UDP if no caps | ||
3429 | if (eq == null) | ||
3430 | { | 3434 | { |
3431 | SendGroupMembership(data); | 3435 | eq.GroupMembershipData(avatarID,data); |
3436 | } | ||
3437 | else | ||
3438 | { | ||
3439 | // use UDP if no caps | ||
3440 | AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket(); | ||
3441 | AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[data.Length]; | ||
3442 | for (int i = 0; i < data.Length; i++) | ||
3443 | { | ||
3444 | AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock(); | ||
3445 | Group.AcceptNotices = data[i].AcceptNotices; | ||
3446 | Group.Contribution = data[i].Contribution; | ||
3447 | Group.GroupID = data[i].GroupID; | ||
3448 | Group.GroupInsigniaID = data[i].GroupPicture; | ||
3449 | Group.GroupName = Util.StringToBytes256(data[i].GroupName); | ||
3450 | Group.GroupPowers = data[i].GroupPowers; | ||
3451 | Groups[i] = Group; | ||
3452 | } | ||
3453 | Groupupdate.GroupData = Groups; | ||
3454 | Groupupdate.AgentData = new AgentGroupDataUpdatePacket.AgentDataBlock(); | ||
3455 | Groupupdate.AgentData.AgentID = avatarID; | ||
3456 | OutPacket(Groupupdate, ThrottleOutPacketType.Task); | ||
3432 | } | 3457 | } |
3433 | |||
3434 | OSDMap llsd = new OSDMap(3); | ||
3435 | OSDArray AgentData = new OSDArray(1); | ||
3436 | OSDMap AgentDataMap = new OSDMap(1); | ||
3437 | AgentDataMap.Add("AgentID", OSD.FromUUID(this.AgentId)); | ||
3438 | AgentDataMap.Add("AvatarID", OSD.FromUUID(avatarID)); | ||
3439 | AgentData.Add(AgentDataMap); | ||
3440 | llsd.Add("AgentData", AgentData); | ||
3441 | OSDArray GroupData = new OSDArray(data.Length); | ||
3442 | OSDArray NewGroupData = new OSDArray(data.Length); | ||
3443 | foreach (GroupMembershipData m in data) | ||
3444 | { | ||
3445 | OSDMap GroupDataMap = new OSDMap(6); | ||
3446 | OSDMap NewGroupDataMap = new OSDMap(1); | ||
3447 | GroupDataMap.Add("GroupPowers", OSD.FromULong(m.GroupPowers)); | ||
3448 | GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices)); | ||
3449 | GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle)); | ||
3450 | GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID)); | ||
3451 | GroupDataMap.Add("GroupName", OSD.FromString(m.GroupName)); | ||
3452 | GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(m.GroupPicture)); | ||
3453 | NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(m.ListInProfile)); | ||
3454 | GroupData.Add(GroupDataMap); | ||
3455 | NewGroupData.Add(NewGroupDataMap); | ||
3456 | } | ||
3457 | llsd.Add("GroupData", GroupData); | ||
3458 | llsd.Add("NewGroupData", NewGroupData); | ||
3459 | |||
3460 | eq.Enqueue(BuildEvent("AgentGroupDataUpdate", llsd), this.AgentId); | ||
3461 | } | 3458 | } |
3462 | 3459 | ||
3463 | public void SendJoinGroupReply(UUID groupID, bool success) | 3460 | public void SendJoinGroupReply(UUID groupID, bool success) |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 2617723..343935d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -1409,12 +1409,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1409 | 1409 | ||
1410 | GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); | 1410 | GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID); |
1411 | IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); | 1411 | IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>(); |
1412 | if (eq != null) | ||
1413 | eq.GroupMembershipData(agentID, membershipArray); | ||
1414 | else | ||
1415 | remoteClient.SendGroupMembership(membershipArray); | ||
1416 | 1412 | ||
1417 | remoteClient.RefreshGroupMembership(); | 1413 | remoteClient.RefreshGroupMembership(); |
1414 | remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray); | ||
1418 | } | 1415 | } |
1419 | 1416 | ||
1420 | /// <summary> | 1417 | /// <summary> |