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