From 2a766b908236889c47abf38e9b354e35a90f87aa Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 23 Jun 2009 20:27:35 +0000 Subject: Fix an error in group membership sending when the memebr count exceeds 60 Also reduce limit to 40 to allow for last logon dates and titles --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a5c0e45..d11261c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -8660,6 +8660,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP while (true) { + int blockCount = members.Count; + if (blockCount > 40) + blockCount = 40; + GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply); groupMembersReply.AgentData = @@ -8668,7 +8672,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP new GroupMembersReplyPacket.GroupDataBlock(); groupMembersReply.MemberData = new GroupMembersReplyPacket.MemberDataBlock[ - members.Count]; + blockCount]; groupMembersReply.AgentData.AgentID = AgentId; groupMembersReply.GroupData.GroupID = @@ -8677,7 +8681,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP groupMembersRequestPacket.GroupData.RequestID; groupMembersReply.GroupData.MemberCount = members.Count; - for (int i = 0 ; i < 60 && members.Count > 0 ; i++) + for (int i = 0 ; i < blockCount ; i++) { GroupMembersData m = members[0]; members.RemoveAt(0); -- cgit v1.1