Allow the member list of groups with more than 70 members to be viewed

without crashing
0.6.6-post-fixes
Melanie Thielker 2009-06-23 14:37:51 +00:00
parent 0fecf4666c
commit a2635e43da
1 changed files with 42 additions and 36 deletions

View File

@ -8658,6 +8658,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
List<GroupMembersData> members =
m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID);
while (true)
{
GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply);
groupMembersReply.AgentData =
@ -8675,9 +8677,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
groupMembersRequestPacket.GroupData.RequestID;
groupMembersReply.GroupData.MemberCount = members.Count;
int i = 0;
foreach (GroupMembersData m in members)
for (int i = 0 ; i < 60 && members.Count > 0 ; i++)
{
GroupMembersData m = members[0];
members.RemoveAt(0);
groupMembersReply.MemberData[i] =
new GroupMembersReplyPacket.MemberDataBlock();
groupMembersReply.MemberData[i].AgentID =
@ -8694,8 +8698,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m.IsOwner;
i++;
}
OutPacket(groupMembersReply, ThrottleOutPacketType.Task);
if (members.Count == 0)
break;
}
}
break;