From dd4deebbcbe07cccf8ce700c29c9884f1f414c85 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 17 Apr 2008 19:42:54 +0000 Subject: * Re-Fixed caps * This fixes chi11ken's/OpenViewer's libsl cap issue. --- OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 13 ------------- OpenSim/Framework/Communications/Capabilities/Caps.cs | 9 ++++++++- .../Framework/Communications/Capabilities/CapsHandlers.cs | 2 ++ 3 files changed, 10 insertions(+), 14 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 9f202ff..ec5717e 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -251,11 +251,6 @@ namespace OpenSim.Framework.Communications.Cache ItemReceive(userID, itemInfo); m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); } - else - { - m_log.Error("[UNABLE TO UPLOAD]: "); - } - } /// @@ -269,10 +264,6 @@ namespace OpenSim.Framework.Communications.Cache { m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); } - else - { - m_log.Error("[UNABLE TO UPDATE]: "); - } } /// @@ -292,10 +283,6 @@ namespace OpenSim.Framework.Communications.Cache m_commsManager.InventoryService.DeleteInventoryItem(userID, item); } } - else - { - m_log.Error("[UNABLE TO DELETE]: "); - } return result; } diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index a65a3f1..2eff9c2 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -100,6 +100,7 @@ namespace OpenSim.Region.Capabilities private int m_eventQueueCount = 1; private Queue m_capsEventQueue = new Queue(); private bool m_dumpAssetsToFile; + private string m_regionName; // These are callbacks which will be setup by the scene so that we can update scene data when we // receive capability calls @@ -110,7 +111,7 @@ namespace OpenSim.Region.Capabilities public GetClientDelegate GetClient = null; public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, - LLUUID agent, bool dumpAssetsToFile) + LLUUID agent, bool dumpAssetsToFile, string regionName) { m_assetCache = assetCache; m_capsObjectPath = capsPath; @@ -120,6 +121,7 @@ namespace OpenSim.Region.Capabilities m_agentID = agent; m_dumpAssetsToFile = dumpAssetsToFile; m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort); + m_regionName = regionName; } /// @@ -199,6 +201,7 @@ namespace OpenSim.Region.Capabilities /// public string CapsRequest(string request, string path, string param) { + m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName); //Console.WriteLine("caps request " + request); string result = LLSDHelpers.SerialiseLLSDReply(m_capsHandlers.CapsDetails); //m_log.DebugFormat("[CAPS] CapsRequest {0}", result); @@ -225,6 +228,7 @@ namespace OpenSim.Region.Capabilities string unmodifiedRequest = request.ToString(); //m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest); + m_log.Debug("[CAPS]: Inventory Request in region: " + m_regionName); Hashtable hash = new Hashtable(); try @@ -366,6 +370,7 @@ namespace OpenSim.Region.Capabilities /// public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) { + m_log.Debug("[CAPS]: MapLayer Request in region: " + m_regionName); LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse()); return mapResponse; @@ -472,6 +477,7 @@ namespace OpenSim.Region.Capabilities { try { + m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName); //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); @@ -523,6 +529,7 @@ namespace OpenSim.Region.Capabilities /// public string NoteCardAgentInventory(string request, string path, string param) { + m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName); //libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)libsecondlife.StructuredData.LLSDParser.DeserializeBinary(Helpers.StringToField(request)); Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); diff --git a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs index 3518e20..6992bd1 100644 --- a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs +++ b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs @@ -68,6 +68,8 @@ namespace OpenSim.Region.Capabilities /// handler to be removed public void Remove(string capsName) { + // This line must be here, or caps will break! + m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path); m_capsHandlers.Remove(capsName); } -- cgit v1.1