aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs')
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index b8c8c85..a5dcdcc 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -40,7 +40,12 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
40 public class AssetXferUploader 40 public class AssetXferUploader
41 { 41 {
42 // Viewer's notion of the default texture 42 // Viewer's notion of the default texture
43 private UUID defaultID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f"); 43 private List<UUID> defaultIDs = new List<UUID> {
44 new UUID("5748decc-f629-461c-9a36-a35a221fe21f"),
45 new UUID("7ca39b4c-bd19-4699-aff7-f93fd03d3e7b"),
46 new UUID("6522e74d-1660-4e7f-b601-6f48c1659a77"),
47 new UUID("c228d1cf-4b5d-4ba8-84f4-899a0796aa97")
48 };
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 50
46 private AssetBase m_asset; 51 private AssetBase m_asset;
@@ -244,6 +249,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
244 item.Flags = (uint) wearableType; 249 item.Flags = (uint) wearableType;
245 item.CreationDate = Util.UnixTimeSinceEpoch(); 250 item.CreationDate = Util.UnixTimeSinceEpoch();
246 251
252 m_log.DebugFormat("[XFER]: Created item {0} with asset {1}",
253 item.ID, item.AssetID);
254
247 if (m_Scene.AddInventoryItem(item)) 255 if (m_Scene.AddInventoryItem(item))
248 ourClient.SendInventoryItemCreateUpdate(item, callbackID); 256 ourClient.SendInventoryItemCreateUpdate(item, callbackID);
249 else 257 else
@@ -280,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
280 UUID tx = new UUID(parts[1]); 288 UUID tx = new UUID(parts[1]);
281 int id = Convert.ToInt32(parts[0]); 289 int id = Convert.ToInt32(parts[0]);
282 290
283 if (tx == defaultID || tx == UUID.Zero || 291 if (defaultIDs.Contains(tx) || tx == UUID.Zero ||
284 (allowed.ContainsKey(id) && allowed[id] == tx)) 292 (allowed.ContainsKey(id) && allowed[id] == tx))
285 { 293 {
286 validated.Add(parts[0] + " " + tx.ToString()); 294 validated.Add(parts[0] + " " + tx.ToString());
@@ -293,7 +301,11 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
293 if ((perms & full) != full) 301 if ((perms & full) != full)
294 { 302 {
295 m_log.ErrorFormat("[ASSET UPLOADER]: REJECTED update with texture {0} from {1} because they do not own the texture", tx, ourClient.AgentId); 303 m_log.ErrorFormat("[ASSET UPLOADER]: REJECTED update with texture {0} from {1} because they do not own the texture", tx, ourClient.AgentId);
296 validated.Add(parts[0] + " " + defaultID.ToString()); 304 validated.Add(parts[0] + " " + UUID.Zero.ToString());
305 }
306 else
307 {
308 validated.Add(line);
297 } 309 }
298 } 310 }
299 textures--; 311 textures--;