From ad6499cc09319a6895d6ad55ee0ecf314c39571f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 20 Jan 2020 11:48:32 +0000 Subject: [PATCH] fix last log message, and change things a bit --- .../FetchInventory/FetchInvDescHandler.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index 5d51ddb60f..b060abe04d 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs @@ -65,19 +65,21 @@ namespace OpenSim.Capabilities.Handlers { //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request); - Hashtable hash = new Hashtable(); + ArrayList foldersrequested = null; try { - hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); + Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); + foldersrequested = (ArrayList)hash["folders"]; + hash = null; } catch (Exception e) { - m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace); - m_log.Error("Request: " + request); + m_log.ErrorFormat("[FETCH INV DESC]: fail parsing request: '{0}'; path: '{1}'; exception: '{2}'", request, path, e.Message); + foldersrequested = null; } - ArrayList foldersrequested = (ArrayList)hash["folders"]; - hash.Clear(); + if(foldersrequested == null || foldersrequested.Count == 0) + return "folders"; List folders = new List(); for (int i = 0; i < foldersrequested.Count; i++) @@ -91,7 +93,7 @@ namespace OpenSim.Capabilities.Handlers } catch (Exception e) { - m_log.Debug("[WEB FETCH INV DESC HANDLER]: caught exception doing OSD deserialize" + e); + m_log.Debug("[WEB FETCH INV DESC HANDLER]: caught exception doing OSD deserialize" + e.Message); continue; }