From 1ec84ac8b160c1a6ee903b832c75635d1219fe5a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 15 Sep 2012 02:12:26 +0100 Subject: Add basic asset connector tests to check behaviour for normal, local and temporary assets. Make AssetServiceConnector return more useful data on failure, such as what DLL it was trying to load Allow LocalAssetServiceConnector.GetData() to work without a cache present, as works for the other lasc Get* methods. --- OpenSim/Services/AssetService/AssetServiceBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/AssetService') diff --git a/OpenSim/Services/AssetService/AssetServiceBase.cs b/OpenSim/Services/AssetService/AssetServiceBase.cs index 177c565..58ab052 100644 --- a/OpenSim/Services/AssetService/AssetServiceBase.cs +++ b/OpenSim/Services/AssetService/AssetServiceBase.cs @@ -84,7 +84,7 @@ namespace OpenSim.Services.AssetService m_Database = LoadPlugin(dllName); if (m_Database == null) - throw new Exception("Could not find a storage interface in the given module"); + throw new Exception(string.Format("Could not find a storage interface in the module {0}", dllName)); m_Database.Initialise(connString); @@ -96,7 +96,7 @@ namespace OpenSim.Services.AssetService m_AssetLoader = LoadPlugin(loaderName); if (m_AssetLoader == null) - throw new Exception("Asset loader could not be loaded"); + throw new Exception(string.Format("Asset loader could not be loaded from {0}", loaderName)); } } } -- cgit v1.1 From 462ad336dcd59dfc4325aed9e6d635aa866cd094 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 2 Nov 2012 00:02:10 +0000 Subject: Move check to allow only deletion of maptiles up to AssetServerDeleteHandler from AssetService. This allows us to use a common check for both AssetService and XAssetService. It also allows future console commands to delete an asset. As before, deletion of maptile assets is not allowed remotely unless this is explicitly configured. --- OpenSim/Services/AssetService/AssetService.cs | 17 ++--------------- OpenSim/Services/AssetService/XAssetService.cs | 18 ++---------------- 2 files changed, 4 insertions(+), 31 deletions(-) (limited to 'OpenSim/Services/AssetService') diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index b1f0f7e..e7eb6fe 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs @@ -70,7 +70,7 @@ namespace OpenSim.Services.AssetService if (assetLoaderEnabled) { - m_log.DebugFormat("[ASSET]: Loading default asset set from {0}", loaderArgs); + m_log.DebugFormat("[ASSET SERVICE]: Loading default asset set from {0}", loaderArgs); m_AssetLoader.ForEachDefaultXmlAsset( loaderArgs, @@ -197,20 +197,7 @@ namespace OpenSim.Services.AssetService if (!UUID.TryParse(id, out assetID)) return false; - AssetBase asset = m_Database.GetAsset(assetID); - if (asset == null) - return false; - - if ((int)(asset.Flags & AssetFlags.Maptile) != 0) - { - return m_Database.Delete(id); - } - else - { - m_log.DebugFormat("[ASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id); - } - - return false; + return m_Database.Delete(id); } } } \ No newline at end of file diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs index e62bcb5..a1d10ed 100644 --- a/OpenSim/Services/AssetService/XAssetService.cs +++ b/OpenSim/Services/AssetService/XAssetService.cs @@ -194,21 +194,7 @@ namespace OpenSim.Services.AssetService if (!UUID.TryParse(id, out assetID)) return false; - AssetBase asset = m_Database.GetAsset(assetID); - if (asset == null) - return false; - - if ((int)(asset.Flags & AssetFlags.Maptile) != 0) - { - return m_Database.Delete(id); - } - else - { - m_log.DebugFormat("[XASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id); - } - - return false; + return m_Database.Delete(id); } } -} - +} \ No newline at end of file -- cgit v1.1 From df62d113abf5d9264caca7f2e554d061c260e522 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 14 Nov 2012 21:18:18 -0800 Subject: The last few AssemblyInfos. Finished! --- .../AssetService/Properties/AssemblyInfo.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 OpenSim/Services/AssetService/Properties/AssemblyInfo.cs (limited to 'OpenSim/Services/AssetService') diff --git a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1509400 --- /dev/null +++ b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenSim.Services.AssetService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("http://opensimulator.org")] +[assembly: AssemblyProduct("OpenSim")] +[assembly: AssemblyCopyright("OpenSimulator developers")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("fe57c0df-6101-4c23-ae1a-7b3e937843f9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] -- cgit v1.1