aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs')
-rw-r--r--OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs18
1 files changed, 6 insertions, 12 deletions
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
index b89fd6a..b7ca703 100644
--- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
@@ -73,12 +73,10 @@ namespace OpenSim.Capabilities.Handlers
73 /// <param name="httpResponse"></param> 73 /// <param name="httpResponse"></param>
74 /// <returns>The upload response if the request is successful, null otherwise.</returns> 74 /// <returns>The upload response if the request is successful, null otherwise.</returns>
75 public string UploadBakedTexture( 75 public string UploadBakedTexture(
76 string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 76 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
77 { 77 {
78 try 78 try
79 { 79 {
80// m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " + m_regionName);
81
82 string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath; 80 string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
83 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); 81 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
84 82
@@ -106,7 +104,7 @@ namespace OpenSim.Capabilities.Handlers
106 } 104 }
107 catch (Exception e) 105 catch (Exception e)
108 { 106 {
109 m_log.Error("[UPLOAD BAKED TEXTURE HANDLER]: " + e.ToString()); 107 m_log.Error("[CAPS]: " + e.ToString());
110 } 108 }
111 109
112 return null; 110 return null;
@@ -132,8 +130,6 @@ namespace OpenSim.Capabilities.Handlers
132 130
133 class BakedTextureUploader 131 class BakedTextureUploader
134 { 132 {
135// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
136
137 public event Action<UUID, byte[]> OnUpLoad; 133 public event Action<UUID, byte[]> OnUpLoad;
138 134
139 private string uploaderPath = String.Empty; 135 private string uploaderPath = String.Empty;
@@ -158,12 +154,10 @@ namespace OpenSim.Capabilities.Handlers
158 public string uploaderCaps(byte[] data, string path, string param) 154 public string uploaderCaps(byte[] data, string path, string param)
159 { 155 {
160 Action<UUID, byte[]> handlerUpLoad = OnUpLoad; 156 Action<UUID, byte[]> handlerUpLoad = OnUpLoad;
161
162 // Don't do this asynchronously, otherwise it's possible for the client to send set appearance information
163 // on another thread which might send out avatar updates before the asset has been put into the asset
164 // service.
165 if (handlerUpLoad != null) 157 if (handlerUpLoad != null)
166 handlerUpLoad(newAssetID, data); 158 {
159 Util.FireAndForget(delegate(object o) { handlerUpLoad(newAssetID, data); });
160 }
167 161
168 string res = String.Empty; 162 string res = String.Empty;
169 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); 163 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
@@ -175,7 +169,7 @@ namespace OpenSim.Capabilities.Handlers
175 169
176 httpListener.RemoveStreamHandler("POST", uploaderPath); 170 httpListener.RemoveStreamHandler("POST", uploaderPath);
177 171
178// m_log.DebugFormat("[BAKED TEXTURE UPLOADER]: baked texture upload completed for {0}", newAssetID); 172 // m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
179 173
180 return res; 174 return res;
181 } 175 }