Fix for mantis 952

0.6.0-stable
Teravus Ovares 2008-04-14 01:10:48 +00:00
parent 665c5d89f8
commit 30f93b2201
1 changed files with 30 additions and 23 deletions

View File

@ -195,37 +195,44 @@ namespace OpenSim.Region.Environment.Modules
updateUsers.Add(fli.Friend); updateUsers.Add(fli.Friend);
} }
} }
for (int i = 0; i < updateUsers.Count; i++) lock (updateUsers)
{ {
List<FriendListItem> flfli = new List<FriendListItem>(); for (int i = 0; i < updateUsers.Count; i++)
lock (FriendLists)
{ {
if (FriendLists.ContainsKey(updateUsers[i])) List<FriendListItem> flfli = new List<FriendListItem>();
flfli = FriendLists[updateUsers[i]];
} lock (FriendLists)
for (int j = 0; j < flfli.Count; j++)
{
if (flfli[i].Friend == AgentId)
{ {
flfli[i].onlinestatus = false; if (FriendLists.ContainsKey(updateUsers[i]))
flfli = FriendLists[updateUsers[i]];
} }
for (int j = 0; j < flfli.Count; j++)
{
if (flfli[i].Friend == AgentId)
{
flfli[i].onlinestatus = false;
}
}
} }
} for (int i = 0; i < updateUsers.Count; i++)
for (int i = 0; i < updateUsers.Count; i++)
{
ScenePresence av = GetPresenceFromAgentID(updateUsers[i]);
if (av != null)
{ {
ScenePresence av = GetPresenceFromAgentID(updateUsers[i]);
if (av != null)
{
OfflineNotificationPacket onp = new OfflineNotificationPacket(); OfflineNotificationPacket onp = new OfflineNotificationPacket();
OfflineNotificationPacket.AgentBlockBlock[] onpb = new OfflineNotificationPacket.AgentBlockBlock[1]; OfflineNotificationPacket.AgentBlockBlock[] onpb = new OfflineNotificationPacket.AgentBlockBlock[1];
OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock(); OfflineNotificationPacket.AgentBlockBlock onpbl = new OfflineNotificationPacket.AgentBlockBlock();
onpbl.AgentID = AgentId; onpbl.AgentID = AgentId;
onpb[0] = onpbl; onpb[0] = onpbl;
onp.AgentBlock = onpb; onp.AgentBlock = onpb;
av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task); av.ControllingClient.OutPacket(onp, ThrottleOutPacketType.Task);
}
} }
} }
lock (FriendLists) lock (FriendLists)