Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

Resolve merge conflicts

Conflicts:
	OpenSim/Region/Framework/Scenes/SceneGraph.cs
prebuild-update
Justin Clark-Casey (justincc) 2010-08-26 00:35:03 +01:00
commit 87a6554d4b
3 changed files with 47 additions and 31 deletions

View File

@ -81,12 +81,17 @@ namespace OpenSim.Framework.Servers.HttpServer
}
catch (Exception e)
{
m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: {1}", requestUrl, e.Message);
m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: " + e.ToString(), requestUrl);
}
finally
{
if (requestStream != null)
requestStream.Close();
// If this is closed, it will be disposed internally,
// but the above write is asynchronous and may hit after
// we're through here. So the thread handling that will
// throw and put us back into the catch above. Isn't
// .NET great?
//if (requestStream != null)
// requestStream.Close();
// Let's not close this
//buffer.Close();
@ -112,7 +117,7 @@ namespace OpenSim.Framework.Servers.HttpServer
}
catch (Exception e)
{
m_log.DebugFormat("[FORMS]: exception occured on receiving reply {0}", e.Message);
m_log.DebugFormat("[FORMS]: exception occured on receiving reply " + e.ToString());
}
finally
{

View File

@ -3164,7 +3164,6 @@ namespace OpenSim.Region.Framework.Scenes
}
m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode);
//m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false));
//m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true));
}

View File

@ -95,7 +95,6 @@ namespace OpenSim.Region.Framework.Scenes
protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalID = new Dictionary<uint, SceneObjectGroup>();
protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullID = new Dictionary<UUID, SceneObjectGroup>();
private readonly Object m_dictionary_lock = new Object();
private Object m_updateLock = new Object();
@ -136,11 +135,10 @@ namespace OpenSim.Region.Framework.Scenes
m_scenePresenceArray = newlist;
}
lock (m_dictionary_lock)
{
lock (SceneObjectGroupsByFullID)
SceneObjectGroupsByFullID.Clear();
lock (SceneObjectGroupsByLocalID)
SceneObjectGroupsByLocalID.Clear();
}
Entities.Clear();
}
@ -397,18 +395,21 @@ namespace OpenSim.Region.Framework.Scenes
if (OnObjectCreate != null)
OnObjectCreate(sceneObject);
lock (m_dictionary_lock)
lock (SceneObjectGroupsByFullID)
{
SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject;
foreach (SceneObjectPart part in sceneObject.Children.Values)
SceneObjectGroupsByFullID[part.UUID] = sceneObject;
}
lock (SceneObjectGroupsByLocalID)
{
SceneObjectGroupsByLocalID[sceneObject.LocalId] = sceneObject;
foreach (SceneObjectPart part in sceneObject.Children.Values)
{
SceneObjectGroupsByFullID[part.UUID] = sceneObject;
SceneObjectGroupsByLocalID[part.LocalId] = sceneObject;
}
}
}
}
return true;
}
@ -421,29 +422,32 @@ namespace OpenSim.Region.Framework.Scenes
{
if (Entities.ContainsKey(uuid))
{
SceneObjectGroup grp = (SceneObjectGroup)Entities[uuid];
if (!resultOfObjectLinked)
{
SceneObjectGroup sog = Entities[uuid] as SceneObjectGroup;
m_numPrim -= grp.PrimCount;
lock (sog.Children)
{
m_numPrim -= sog.PrimCount;
if ((((SceneObjectGroup)Entities[uuid]).RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics)
{
RemovePhysicalPrim(sog.PrimCount);
}
}
if ((grp.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics)
RemovePhysicalPrim(grp.PrimCount);
}
if (OnObjectRemove != null)
OnObjectRemove(Entities[uuid]);
lock (m_dictionary_lock)
lock (SceneObjectGroupsByFullID)
{
SceneObjectGroupsByFullID.Remove(uuid);
SceneObjectGroupsByLocalID.Remove(((SceneObjectGroup)Entities[uuid]).LocalId);
foreach (SceneObjectPart part in grp.Children.Values)
SceneObjectGroupsByFullID.Remove(part.UUID);
SceneObjectGroupsByFullID.Remove(grp.RootPart.UUID);
}
lock (SceneObjectGroupsByLocalID)
{
foreach (SceneObjectPart part in grp.Children.Values)
SceneObjectGroupsByLocalID.Remove(part.LocalId);
SceneObjectGroupsByLocalID.Remove(grp.RootPart.LocalId);
}
Entities.Remove(uuid);
//SceneObjectGroup part;
//((part.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics)
@ -868,7 +872,9 @@ namespace OpenSim.Region.Framework.Scenes
{
if (SceneObjectGroupsByLocalID.TryGetValue(localID, out sog))
{
if (sog.HasChildPrim(localID))
return sog;
SceneObjectGroupsByLocalID.Remove(localID);
}
}
@ -904,8 +910,14 @@ namespace OpenSim.Region.Framework.Scenes
{
if (SceneObjectGroupsByFullID.TryGetValue(fullID, out sog))
{
lock (sog.Children)
{
if (sog.Children.ContainsKey(fullID))
return sog;
}
SceneObjectGroupsByFullID.Remove(fullID);
}
}
List<EntityBase> EntityList = GetEntities();