Prevent the Viewer's threaded inventory retrieval causing a OOM and overload
the inventory server by serializing upstream requests.remotes/origin/0.6.7-post-fixes
parent
f32de6fe88
commit
994c5e2094
|
@ -106,6 +106,7 @@ namespace OpenSim.Framework.Capabilities
|
|||
private Queue<string> m_capsEventQueue = new Queue<string>();
|
||||
private bool m_dumpAssetsToFile;
|
||||
private string m_regionName;
|
||||
private object m_fetchLock = new Object();
|
||||
|
||||
public bool SSLCaps
|
||||
{
|
||||
|
@ -368,15 +369,21 @@ namespace OpenSim.Framework.Capabilities
|
|||
|
||||
public string FetchInventoryDescendentsRequest(string request, string path, string param,OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
{
|
||||
// m_log.Debug("[CAPS]: FetchInventoryDescendentsRequest in region: " + m_regionName + "request is "+request);
|
||||
|
||||
// nasty temporary hack here, the linden client falsely identifies the uuid 00000000-0000-0000-0000-000000000000 as a string which breaks us
|
||||
// nasty temporary hack here, the linden client falsely
|
||||
// identifies the uuid 00000000-0000-0000-0000-000000000000
|
||||
// as a string which breaks us
|
||||
//
|
||||
// correctly mark it as a uuid
|
||||
//
|
||||
request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>");
|
||||
|
||||
// another hack <integer>1</integer> results in a System.ArgumentException: Object type System.Int32 cannot be converted to target type: System.Boolean
|
||||
// another hack <integer>1</integer> results in a
|
||||
// System.ArgumentException: Object type System.Int32 cannot
|
||||
// be converted to target type: System.Boolean
|
||||
//
|
||||
request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>");
|
||||
request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>");
|
||||
|
||||
Hashtable hash = new Hashtable();
|
||||
try
|
||||
{
|
||||
|
@ -391,6 +398,8 @@ namespace OpenSim.Framework.Capabilities
|
|||
ArrayList foldersrequested = (ArrayList)hash["folders"];
|
||||
|
||||
string response = "";
|
||||
lock (m_fetchLock)
|
||||
{
|
||||
for (int i = 0; i < foldersrequested.Count; i++)
|
||||
{
|
||||
string inventoryitemstr = "";
|
||||
|
@ -431,6 +440,7 @@ namespace OpenSim.Framework.Capabilities
|
|||
//m_log.DebugFormat("[CAPS]: Replying to CAPS fetch inventory request with following xml");
|
||||
//m_log.Debug("[CAPS] "+response);
|
||||
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue