diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
9 files changed, 20 insertions, 33 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index e192b81..f698ea1 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -112,11 +112,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
112 | bool storeLocal, bool tempFile) | 112 | bool storeLocal, bool tempFile) |
113 | { | 113 | { |
114 | ourClient = remoteClient; | 114 | ourClient = remoteClient; |
115 | m_asset = new AssetBase(); | 115 | m_asset = new AssetBase(assetID, "blank", type); |
116 | m_asset.FullID = assetID; | ||
117 | m_asset.Type = type; | ||
118 | m_asset.Data = data; | 116 | m_asset.Data = data; |
119 | m_asset.Name = "blank"; | ||
120 | m_asset.Description = "empty"; | 117 | m_asset.Description = "empty"; |
121 | m_asset.Local = storeLocal; | 118 | m_asset.Local = storeLocal; |
122 | m_asset.Temporary = tempFile; | 119 | m_asset.Temporary = tempFile; |
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 7456e8c..5fde35f 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -238,12 +238,11 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
238 | 238 | ||
239 | if (m_cache != null) | 239 | if (m_cache != null) |
240 | { | 240 | { |
241 | AssetBase layerDecodeAsset = new AssetBase(); | 241 | string assetID = "j2kCache_" + AssetId.ToString(); |
242 | layerDecodeAsset.ID = "j2kCache_" + AssetId.ToString(); | 242 | |
243 | AssetBase layerDecodeAsset = new AssetBase(assetID, assetID, (sbyte)AssetType.Notecard); | ||
243 | layerDecodeAsset.Local = true; | 244 | layerDecodeAsset.Local = true; |
244 | layerDecodeAsset.Name = layerDecodeAsset.ID; | ||
245 | layerDecodeAsset.Temporary = true; | 245 | layerDecodeAsset.Temporary = true; |
246 | layerDecodeAsset.Type = (sbyte)AssetType.Notecard; | ||
247 | 246 | ||
248 | #region Serialize Layer Data | 247 | #region Serialize Layer Data |
249 | 248 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 7abaac0..4c02214 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -398,11 +398,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
398 | { | 398 | { |
399 | sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; | 399 | sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; |
400 | 400 | ||
401 | //m_log.DebugFormat("[INVENTORY ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); | 401 | if (assetType == (sbyte)AssetType.Unknown) |
402 | m_log.WarnFormat("[INVENTORY ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, uuid); | ||
402 | 403 | ||
403 | AssetBase asset = new AssetBase(new UUID(uuid), "RandomName"); | 404 | //m_log.DebugFormat("[INVENTORY ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); |
404 | 405 | ||
405 | asset.Type = assetType; | 406 | AssetBase asset = new AssetBase(new UUID(uuid), "RandomName", assetType); |
406 | asset.Data = data; | 407 | asset.Data = data; |
407 | 408 | ||
408 | m_scene.AssetService.Store(asset); | 409 | m_scene.AssetService.Store(asset); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index c366150..41bb9dc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -122,8 +122,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
122 | } | 122 | } |
123 | 123 | ||
124 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 124 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
125 | AssetBase asset1 = new AssetBase(); | 125 | AssetBase asset1 = new AssetBase(asset1Id, asset1Id.ToString(), (sbyte)AssetType.Object); |
126 | asset1.FullID = asset1Id; | ||
127 | asset1.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(object1)); | 126 | asset1.Data = Encoding.ASCII.GetBytes(SceneObjectSerializer.ToXml2Format(object1)); |
128 | scene.AssetService.Store(asset1); | 127 | scene.AssetService.Store(asset1); |
129 | 128 | ||
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 9a6c49a..43761fc 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -311,11 +311,8 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
311 | } | 311 | } |
312 | 312 | ||
313 | // Create a new asset for user | 313 | // Create a new asset for user |
314 | AssetBase asset = new AssetBase(); | 314 | AssetBase asset = new AssetBase(UUID.Random(), "DynamicImage" + Util.RandomClass.Next(1, 10000), (sbyte)AssetType.Texture); |
315 | asset.FullID = UUID.Random(); | ||
316 | asset.Data = assetData; | 315 | asset.Data = assetData; |
317 | asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); | ||
318 | asset.Type = 0; | ||
319 | asset.Description = String.Format("URL image : {0}", Url); | 316 | asset.Description = String.Format("URL image : {0}", Url); |
320 | asset.Local = false; | 317 | asset.Local = false; |
321 | asset.Temporary = ((Disp & DISP_TEMP) != 0); | 318 | asset.Temporary = ((Disp & DISP_TEMP) != 0); |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index c261943..70a225e 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -332,10 +332,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
332 | { | 332 | { |
333 | sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; | 333 | sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; |
334 | 334 | ||
335 | if (assetType == (sbyte)AssetType.Unknown) | ||
336 | m_log.WarnFormat("[ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, uuid); | ||
337 | |||
335 | //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); | 338 | //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); |
336 | 339 | ||
337 | AssetBase asset = new AssetBase(new UUID(uuid), String.Empty); | 340 | AssetBase asset = new AssetBase(new UUID(uuid), String.Empty, assetType); |
338 | asset.Type = assetType; | ||
339 | asset.Data = data; | 341 | asset.Data = data; |
340 | 342 | ||
341 | // We're relying on the asset service to do the sensible thing and not store the asset if it already | 343 | // We're relying on the asset service to do the sensible thing and not store the asset if it already |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs index 5208e7a..2d2c570 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs | |||
@@ -158,9 +158,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
158 | 158 | ||
159 | m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); | 159 | m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); |
160 | 160 | ||
161 | AssetBase asset = new AssetBase(new UUID(filename), metadata.Name); | 161 | AssetBase asset = new AssetBase(new UUID(filename), metadata.Name, metadata.AssetType); |
162 | asset.Description = metadata.Description; | 162 | asset.Description = metadata.Description; |
163 | asset.Type = metadata.AssetType; | ||
164 | asset.Data = data; | 163 | asset.Data = data; |
165 | 164 | ||
166 | m_cache.Store(asset); | 165 | m_cache.Store(asset); |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs b/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs index ddac515..2ff635b 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateTerrainXferHandler.cs | |||
@@ -52,16 +52,11 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
52 | 52 | ||
53 | public EstateTerrainXferHandler(IClientAPI pRemoteClient, string pClientFilename) | 53 | public EstateTerrainXferHandler(IClientAPI pRemoteClient, string pClientFilename) |
54 | { | 54 | { |
55 | 55 | m_asset = new AssetBase(UUID.Zero, pClientFilename, type); | |
56 | m_asset = new AssetBase(); | ||
57 | m_asset.FullID = UUID.Zero; | ||
58 | m_asset.Type = type; | ||
59 | m_asset.Data = new byte[0]; | 56 | m_asset.Data = new byte[0]; |
60 | m_asset.Name = pClientFilename; | ||
61 | m_asset.Description = "empty"; | 57 | m_asset.Description = "empty"; |
62 | m_asset.Local = true; | 58 | m_asset.Local = true; |
63 | m_asset.Temporary = true; | 59 | m_asset.Temporary = true; |
64 | |||
65 | } | 60 | } |
66 | 61 | ||
67 | public ulong XferID | 62 | public ulong XferID |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f4b54aa..44a651f 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -1077,14 +1077,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1077 | 1077 | ||
1078 | m_scene.RegionInfo.RegionSettings.TerrainImageID = TerrainImageUUID; | 1078 | m_scene.RegionInfo.RegionSettings.TerrainImageID = TerrainImageUUID; |
1079 | 1079 | ||
1080 | AssetBase asset = new AssetBase(); | 1080 | AssetBase asset = new AssetBase( |
1081 | asset.FullID = m_scene.RegionInfo.RegionSettings.TerrainImageID; | 1081 | m_scene.RegionInfo.RegionSettings.TerrainImageID, |
1082 | "terrainImage_" + m_scene.RegionInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(), | ||
1083 | (sbyte)AssetType.Texture); | ||
1082 | asset.Data = data; | 1084 | asset.Data = data; |
1083 | asset.Name | ||
1084 | = "terrainImage_" + m_scene.RegionInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(); | ||
1085 | asset.Description = m_scene.RegionInfo.RegionName; | 1085 | asset.Description = m_scene.RegionInfo.RegionName; |
1086 | |||
1087 | asset.Type = 0; | ||
1088 | asset.Temporary = temporary; | 1086 | asset.Temporary = temporary; |
1089 | m_scene.AssetService.Store(asset); | 1087 | m_scene.AssetService.Store(asset); |
1090 | } | 1088 | } |