From 6600a7a9bc8781f5ccc51abed464c5b32c65a5c3 Mon Sep 17 00:00:00 2001
From: Dr Scofield
Date: Fri, 13 Feb 2009 16:11:52 +0000
Subject: fixing crash due to make-child and make-root stepping on each other's
toes
---
.../Avatar/Concierge/ConciergeModule.cs | 23 +++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
index 3f99562..83c3c34 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
@@ -280,9 +280,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
{
m_log.DebugFormat("[Concierge]: {0} logs off from {1}", client.Name, client.Scene.RegionInfo.RegionName);
RemoveFromAttendeeList(client.AgentId, client.Name, client.Scene);
- AnnounceToAgentsRegion(client.Scene, String.Format(m_announceLeaving, client.Name, client.Scene.RegionInfo.RegionName,
- m_sceneAttendees[client.Scene].Count));
- UpdateBroker(client.Scene);
+ lock(m_sceneAttendees)
+ {
+ AnnounceToAgentsRegion(client.Scene, String.Format(m_announceLeaving, client.Name, client.Scene.RegionInfo.RegionName,
+ m_sceneAttendees[client.Scene].Count));
+ UpdateBroker(client.Scene);
+ m_attendeeNames.Remove(client.AgentId);
+ }
}
}
@@ -348,7 +352,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
}
attendees.Remove(agentID);
- m_attendeeNames.Remove(agentID);
}
}
@@ -386,10 +389,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
attendees.Count, scene.RegionInfo.RegionName,
scene.RegionInfo.RegionID,
DateTime.UtcNow.ToString("s")));
- foreach (UUID uuid in attendees)
+ lock(m_sceneAttendees)
{
- string name = m_attendeeNames[uuid];
- list.Append(String.Format(" \n", name, uuid));
+ foreach (UUID uuid in attendees)
+ {
+ if (m_attendeeNames.ContainsKey(uuid))
+ {
+ string name = m_attendeeNames[uuid];
+ list.Append(String.Format(" \n", name, uuid));
+ }
+ }
}
list.Append("");
}
--
cgit v1.1