From afef1ac191d32e9c1514c294b17e404b1d4ae217 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 5 Nov 2009 13:10:58 -0800 Subject: Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen --- OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | 2 +- OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index ecda85a..8e311d7 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs @@ -243,7 +243,7 @@ namespace OpenSim.Services.Connectors if (metadata == null) return false; - asset = new AssetBase(); + asset = new AssetBase(metadata.FullID, metadata.Name, metadata.Type); asset.Metadata = metadata; } asset.Data = data; diff --git a/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs index 3d7f112..2f33bab 100644 --- a/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs @@ -140,12 +140,11 @@ namespace OpenSim.Services.Connectors.Grid Bitmap m = new Bitmap(info.RegionID.ToString() + ".jpg"); //m_log.Debug("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width); byte[] imageData = OpenJPEG.EncodeFromImage(m, true); - AssetBase ass = new AssetBase(UUID.Random(), "region " + info.RegionID.ToString()); + AssetBase ass = new AssetBase(UUID.Random(), "region " + info.RegionID.ToString(), (sbyte)AssetType.Texture); // !!! for now //info.RegionSettings.TerrainImageID = ass.FullID; - ass.Type = (int)AssetType.Texture; ass.Temporary = true; ass.Local = true; ass.Data = imageData; -- cgit v1.1 From 69fba2647d47b289383d40fbe0593be5f303201d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 13 Nov 2009 20:16:49 +0000 Subject: minor: remove mono compiler warning --- OpenSim/Services/PresenceService/PresenceService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index 6e59642..ba8eec8 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs @@ -41,9 +41,9 @@ namespace OpenSim.Services.PresenceService { public class PresenceService : PresenceServiceBase, IPresenceService { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); public PresenceService(IConfigSource config) : base(config) -- cgit v1.1