Fixes a race condition in EQ processing that was making EQs pop up again upon client close.

Commented remote call on GetSystemFolders again, so that it's not live yet.
arthursv
Diva Canto 2009-08-11 16:47:36 -07:00
parent 41839efcc5
commit 10d923dbea
4 changed files with 39 additions and 35 deletions

View File

@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
public void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds) public void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds)
{ {
//m_log.Debug(" !!! Setting child seeds in {0} to {1}", RegionInfo.RegionName, value.Count); //m_log.DebugFormat(" !!! Setting child seeds in {0} to {1}", m_scene.RegionInfo.RegionName, seeds.Count);
childrenSeeds[agentID] = seeds; childrenSeeds[agentID] = seeds;
} }

View File

@ -328,15 +328,19 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
public bool HasEvents(UUID agentID) public bool HasEvents(UUID agentID)
{ {
Queue<OSD> queue = TryGetQueue(agentID); // Don't use this, because of race conditions at agent closing time
lock (queue) //Queue<OSD> queue = TryGetQueue(agentID);
{
if (queue.Count > 0)
return true;
else
return false;
}
Queue<OSD> queue = GetQueue(agentID);
if (queue != null)
lock (queue)
{
if (queue.Count > 0)
return true;
else
return false;
}
return false;
} }
public Hashtable GetEvents(UUID pAgentId, string request) public Hashtable GetEvents(UUID pAgentId, string request)

View File

@ -1319,17 +1319,17 @@ namespace OpenSim.Region.Framework.Scenes
return m_commsProvider.GridService.RequestNamedRegions(name, maxNumber); return m_commsProvider.GridService.RequestNamedRegions(name, maxNumber);
} }
// private void Dump(string msg, List<ulong> handles) //private void Dump(string msg, List<ulong> handles)
// { //{
// m_log.Info"-------------- HANDLE DUMP ({0}) ---------", msg); // m_log.InfoFormat("-------------- HANDLE DUMP ({0}) ---------", msg);
// foreach (ulong handle in handles) // foreach (ulong handle in handles)
// { // {
// uint x, y; // uint x, y;
// Utils.LongToUInts(handle, out x, out y); // Utils.LongToUInts(handle, out x, out y);
// x = x / Constants.RegionSize; // x = x / Constants.RegionSize;
// y = y / Constants.RegionSize; // y = y / Constants.RegionSize;
// m_log.Info("({0}, {1})", x, y); // m_log.InfoFormat("({0}, {1})", x, y);
// } // }
// } //}
} }
} }

View File

@ -164,20 +164,20 @@ namespace OpenSim.Services.Connectors
public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID) public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID)
{ {
// !!! Not just yet. // !!! Not just yet.
try //try
{ //{
List<InventoryFolderBase> folders = SynchronousRestSessionObjectPoster<Guid, List<InventoryFolderBase>>.BeginPostObject( // List<InventoryFolderBase> folders = SynchronousRestSessionObjectPoster<Guid, List<InventoryFolderBase>>.BeginPostObject(
"POST", m_ServerURI + "/SystemFolders/", new Guid(userID), sessionID.ToString(), userID.ToString()); // "POST", m_ServerURI + "/SystemFolders/", new Guid(userID), sessionID.ToString(), userID.ToString());
Dictionary<AssetType, InventoryFolderBase> dFolders = new Dictionary<AssetType, InventoryFolderBase>(); // Dictionary<AssetType, InventoryFolderBase> dFolders = new Dictionary<AssetType, InventoryFolderBase>();
foreach (InventoryFolderBase f in folders) // foreach (InventoryFolderBase f in folders)
dFolders[(AssetType)f.Type] = f; // dFolders[(AssetType)f.Type] = f;
return dFolders; // return dFolders;
} //}
catch (Exception e) //catch (Exception e)
{ //{
m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetSystemFolders operation failed, {0} {1}", // m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetSystemFolders operation failed, {0} {1}",
e.Source, e.Message); // e.Source, e.Message);
} //}
return new Dictionary<AssetType, InventoryFolderBase>(); return new Dictionary<AssetType, InventoryFolderBase>();
} }