From 4567555c49cb560dd6f109bbfec42086af3de56f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 5 Dec 2011 20:44:20 +0000 Subject: Implement IOSHttpRequest and IOSHttpResponse http interfaces and use instead of OSHttpRequest/OSHttpResponse. This is required for the substitution of different HTTP servers or the newer HttpServer.dll without having to commit to a particular implementation. This is also required to write regression tests that involve the HTTP layer. If you need to recompile, all you need to do is replace OSHttpRequest/OSHttpResponse references with IOSHttpRequest/IOSHttpResponse. --- .../Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Capabilities/Handlers/UploadBakedTexture') diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs index b89fd6a..e0ccc3c 100644 --- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs @@ -73,7 +73,7 @@ namespace OpenSim.Capabilities.Handlers /// /// The upload response if the request is successful, null otherwise. public string UploadBakedTexture( - string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) + string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { try { -- cgit v1.1 From 8721841fc3944ce0cdf5ce76297e73f9ed269751 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 6 Dec 2011 18:37:13 +0000 Subject: Revert "Stop performing the asset save part of baked texture uploading on the UploadBakedTexture cap asynchronously." This is a possible cause of the dramatic upswing in "Unable to upload... No handler registered for LLSD requests..." Needs more investigation. This reverts commit 1854c52ea3c60d0a47f9793a7f5ec405e15489ca. --- .../UploadBakedTexture/UploadBakedTextureHandler.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/UploadBakedTexture') diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs index e0ccc3c..e3bf8cf 100644 --- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs @@ -106,7 +106,7 @@ namespace OpenSim.Capabilities.Handlers } catch (Exception e) { - m_log.Error("[UPLOAD BAKED TEXTURE HANDLER]: " + e.ToString()); + m_log.Error("[CAPS]: " + e.ToString()); } return null; @@ -132,8 +132,6 @@ namespace OpenSim.Capabilities.Handlers class BakedTextureUploader { -// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public event Action OnUpLoad; private string uploaderPath = String.Empty; @@ -158,12 +156,10 @@ namespace OpenSim.Capabilities.Handlers public string uploaderCaps(byte[] data, string path, string param) { Action handlerUpLoad = OnUpLoad; - - // Don't do this asynchronously, otherwise it's possible for the client to send set appearance information - // on another thread which might send out avatar updates before the asset has been put into the asset - // service. if (handlerUpLoad != null) - handlerUpLoad(newAssetID, data); + { + Util.FireAndForget(delegate(object o) { handlerUpLoad(newAssetID, data); }); + } string res = String.Empty; LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); @@ -175,7 +171,7 @@ namespace OpenSim.Capabilities.Handlers httpListener.RemoveStreamHandler("POST", uploaderPath); -// m_log.DebugFormat("[BAKED TEXTURE UPLOADER]: baked texture upload completed for {0}", newAssetID); + // m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID); return res; } -- cgit v1.1 From 8e542cfa03f9368368a0f73fbcff0d54622b5588 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 6 Dec 2011 21:42:56 +0000 Subject: Stop accidentally setting up the UploadTexture caps handler with the same url for all users This meant that if a user exited the region, the UploadTexture handler would be effectively removed for everyone, causing subsequent failures. This hopefully resolves the recent UploadTexture LLSD problems This was a regression in 5640f2e (Thu Dec 1 23:24:15 2011 +0000) --- .../Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim/Capabilities/Handlers/UploadBakedTexture') diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs index e3bf8cf..b7ca703 100644 --- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs @@ -77,8 +77,6 @@ namespace OpenSim.Capabilities.Handlers { try { -// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + m_regionName); - string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); -- cgit v1.1